[
https://issues.apache.org/jira/browse/TUSCANY-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raymond Feng resolved TUSCANY-1256.
-----------------------------------
Resolution: Fixed
This is fixed by testing if the service.isUnresolved() == true
> NullPointerException when component reference has target of composite
> reference
> -------------------------------------------------------------------------------
>
> Key: TUSCANY-1256
> URL: https://issues.apache.org/jira/browse/TUSCANY-1256
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Model
> Affects Versions: Java-SCA-0.90
> Environment: Windows XP
> Reporter: Simon Nash
> Assigned To: Simon Nash
> Fix For: Java-SCA-0.90
>
>
> A NullPointerException occurs in DefaultCompositeActivator.createWires() when
> a composite's SCDL specifies a component reference with a target attribute
> referring to a composite reference. This is invalid in SCA 1.0.
> The test case org.apache.tuscany.sca.itest.sdodatabinding.DatabindingTestCase
> has this error in greeter.composite.vm (see revision 536691 of
> /incubator/tuscany/java/sca/itest/databindings/sdogen/src/main/resources/generate).
> This error in the test case has been reported as TUSCANY-1255.
> The runtime error occurs because the model contains a service object with no
> InterfaceContract. Here's the stack trace:
> testWSGreet(org.apache.tuscany.sca.itest.sdodatabinding.DatabindingTestCase)
> Time elapsed: 2.774 sec <<< ERROR!
> org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException:
> org.apache.tuscany.core.runtime.ActivationException:
> java.lang.NullPointerException
> at
> org.apache.tuscany.host.embedded.SCADomain.createNewInstance(SCADomain.java:197)
> at
> org.apache.tuscany.host.embedded.SCADomain.newInstance(SCADomain.java:73)
> at
> org.apache.tuscany.sca.itest.sdodatabinding.DatabindingTestCase.setUp(DatabindingTestCase.java:59)
> at junit.framework.TestCase.runBare(TestCase.java:132)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> 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
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
> Caused by: org.osoa.sca.ServiceRuntimeException:
> org.apache.tuscany.core.runtime.ActivationException:
> java.lang.NullPointerException
> at
> org.apache.tuscany.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:136)
> at
> org.apache.tuscany.host.embedded.SCADomain.createNewInstance(SCADomain.java:186)
> ... 20 more
> Caused by: org.apache.tuscany.core.runtime.ActivationException:
> java.lang.NullPointerException
> at
> org.apache.tuscany.core.runtime.DefaultCompositeActivator.start(DefaultCompositeActivator.java:570)
> at
> org.apache.tuscany.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:134)
> ... 21 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.tuscany.core.runtime.DefaultCompositeActivator.createWires(DefaultCompositeActivator.java:357)
> at
> org.apache.tuscany.core.runtime.DefaultCompositeActivator.createRuntimeWires(DefaultCompositeActivator.java:255)
> at
> org.apache.tuscany.core.runtime.DefaultCompositeActivator.start(DefaultCompositeActivator.java:567)
> ... 22 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]