Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
Java-M1
-
None
Description
In your code do the following:
TuscanyRuntime tuscany = new TuscanyRuntime("test", null, null);
tuscany.start();
ModuleContext moduleContext = CurrentModuleContext.getContext();
You will get the following exception:
java.lang.NullPointerException
at org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:81)
at org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase.testGeetings(HelloWorldServiceComponentTestCase.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
To reproduce use the attached test case.