Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-311

NullPointerException from new TuscanyRuntime(...)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • Java-M1
    • Java-M1
    • SCA Java Runtime
    • 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.

      Attachments

        1. testcase.zip
          13 kB
          Jean-Sebastien Delfino
        2. org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase.txt
          4 kB
          Jean-Sebastien Delfino

        Activity

          People

            Unassigned Unassigned
            jsdelfino Jean-Sebastien Delfino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: