You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ignacio Silva-Lepe (JIRA)" <tu...@ws.apache.org> on 2007/05/14 19:29:16 UTC

[jira] Reopened: (TUSCANY-1260) NPE when component reference has target composite with custom implementation

     [ https://issues.apache.org/jira/browse/TUSCANY-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ignacio Silva-Lepe reopened TUSCANY-1260:
-----------------------------------------


Sorry to insist on this, but after removing the test case issues mentioned the main problem persists
(1) the package renaming that requires renaming the ModuleActivator was not a factor initially, but it has been addressed
(2) there is now only one componentType file visible (the one in local was part of the test and thus not in the jar, and the duplicate one in remote-producer was removed)

> NPE when component reference has target composite with custom implementation
> ----------------------------------------------------------------------------
>
>                 Key: TUSCANY-1260
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1260
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Model
>    Affects Versions: Java-SCA-0.90
>         Environment: Windows XP
>            Reporter: Ignacio Silva-Lepe
>             Fix For: Java-SCA-0.90
>
>
> A NPE occurs in DefaultCompositeActivator.createWires() when component reference has target composite with custom implementation. This used to work before the last refactor.
> Running org.apache.tuscany.notification.remoteProducer.TrafficAdvisoryTestCase
> *** binding ntm [null], notificationType [trafficAdvisory]
> >>> NotificationImplementationLoader.resolve, tmpUri [TrafficAdvisoryNotificatio
> n.componentType], ctUri [file:/C:/Devt/NotificationComponents/samples/remote-pro
> ducer/target/test-classes/TrafficAdvisoryNotification.componentType]
> Composite assembly problem: No implementation for component: TrafficAdvisoryProd
> ucer
> Composite assembly problem: Reference not found for component reference: Traffic
> AdvisoryProducer/destination
> >>> createWires, component [TrafficAdvisoryProducer], reference [destination], b
> inding [org.apache.tuscany.core.runtime.RuntimeSCABindingImpl@128f6ee]
> 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(SCADomai
> n.java:197)
>         at org.apache.tuscany.host.embedded.SCADomain.newInstance(SCADomain.java
> :73)
>         at org.apache.tuscany.notification.remoteProducer.TrafficAdvisoryTestCas
> e.setUp(TrafficAdvisoryTestCase.java:40)
>         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)
> >>> getInterfaceContract
> *** interfaceContract [null]
> *** provider not null, bindingContract [null]
> <<< getInterfaceContract, interfaceContract [null]
> *** bindingContract [null]
> *** bindingContract.getInterface() [null]
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> tSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
> stractDirectoryTestSuite.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(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
> refireBooter.java:290)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
> ava: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>(Default
> SCADomain.java:136)
>         at org.apache.tuscany.host.embedded.SCADomain.createNewInstance(SCADomai
> n.java:186)
>         ... 20 more
> Caused by: org.apache.tuscany.core.runtime.ActivationException: java.lang.NullPo
> interException
>         at org.apache.tuscany.core.runtime.DefaultCompositeActivator.start(Defau
> ltCompositeActivator.java:587)
>         at org.apache.tuscany.host.embedded.impl.DefaultSCADomain.<init>(Default
> SCADomain.java:134)
>         ... 21 more
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.core.runtime.DefaultCompositeActivator.createWires
> (DefaultCompositeActivator.java:371)
>         at org.apache.tuscany.core.runtime.DefaultCompositeActivator.createRunti
> meWires(DefaultCompositeActivator.java:255)
>         at org.apache.tuscany.core.runtime.DefaultCompositeActivator.start(Defau
> ltCompositeActivator.java:584)
>         ... 22 more
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.932 sec <<< FA
> ILURE!
> Results :
> Tests in error:
>   testTrafficAdvisoryNotification(org.apache.tuscany.notification.remoteProducer
> .TrafficAdvisoryTestCase)
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> The composite being used is:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://tuscany.apache.org/xmlns/notification/1.0/samples"
>            xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
>            name="TrafficAdvisoryNotificationRemoteProducerComposite">
>     <component name="TrafficAdvisoryProducer">
> 		<implementation.java class="org.apache.tuscany.notification.remoteProducer.TrafficAdvisoryProducer"/>
>         <reference name="destination" target="TrafficAdvisoryNotificationComponent"/>
>     </component>
>     <component name="TrafficAdvisoryNotificationComponent">
>         <implementation.notification name="TrafficAdvisoryNotification"/>
>     </component>
>     
>     <reference name="TrafficAdvisoryNotificationCompositeReference"
>                promote="TrafficAdvisoryNotificationComponent/TrafficAdvisoryNotificationReference">
>         <interface.wsdl interface="http://example.com/TrafficAdvisory.wsdl#wsdl.interface(TrafficAdvisoryPortType)"
>             wsdli:wsdlLocation="http://example.com/TrafficAdvisory.wsdl wsdl/TrafficAdvisory.wsdl">
>             <db:databinding xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0" name="org.apache.axiom.om.OMElement" />
>         </interface.wsdl>
>         <binding.notification notificationType="trafficAdvisory"/>
>     </reference>
> </composite>
> the custom component type is:
> <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance">
>      <service name="TrafficAdvisoryNotificationService">
>            <interface.wsdl interface="http://example.com/TrafficAdvisory.wsdl#wsdl.interface(TrafficAdvisoryPortType)"
>                wsdli:wsdlLocation="http://example.com/TrafficAdvisory.wsdl wsdl/TrafficAdvisory.wsdl">
>                <db:databinding xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0" name="org.apache.axiom.om.OMElement" />
>            </interface.wsdl>
>      </service>
>      <reference name="TrafficAdvisoryNotificationReference"
>                 multiplicity="0..n">
>            <interface.wsdl interface="http://example.com/TrafficAdvisory.wsdl#wsdl.interface(TrafficAdvisoryPortType)"
>                wsdli:wsdlLocation="http://example.com/TrafficAdvisory.wsdl wsdl/TrafficAdvisory.wsdl">
>                <db:databinding xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0" name="org.apache.axiom.om.OMElement" />
>            </interface.wsdl>
>      </reference>
> </componentType>
> the interface.java being used is:
> public interface TrafficAdvisory {
>     void trafficNotification(String report);
> }
> and the interface.wsdl being used is:
> <definitions name="TrafficAdvisory"
>              targetNamespace="http://example.com/TrafficAdvisory.wsdl"
>              xmlns:tns="http://example.com/TrafficAdvisory.wsdl"
>              xmlns:xsd1="http://example.com/TrafficAdvisory.xsd"
>              xmlns="http://schemas.xmlsoap.org/wsdl/">
>     <types>
>         <schema targetNamespace="http://example.com/TrafficAdvisory.xsd"
>                 xmlns:tns="http://example.com/TrafficAdvisory.xsd"
>                 xmlns="http://www.w3.org/2001/XMLSchema">
>             <element name="trafficNotification">
>                 <complexType>
>                     <sequence>
>                         <element name="report" type="string" />
>                     </sequence>
>                 </complexType>
>             </element>
>         </schema>
>     </types>
>     <message name="TrafficNotificationInput">
>         <part name="body" element="xsd1:trafficNotification" />
>     </message>
>     <portType name="TrafficAdvisoryPortType">
>         <operation name="trafficNotification">
>             <input message="tns:TrafficNotificationInput" />
>         </operation>
>     </portType>
> </definitions>

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org