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

Ignacio Silva-Lepe commented on TUSCANY-1260:
---------------------------------------------

It seems like the distribution has the same problem, is the distribution 
supposed to work now?

After issuing the command:
C:\Devt\NotificationComponents\samples\remote-producer>java -Dnotification.httpP
ort=8080 -cp "target\tuscany-notification-remote-producer-sample-1.0-incubating-
SNAPSHOT.jar;..\..\local\target\tuscany-notification-local-1.0-incubating-SNAPSH
OT.jar;..\..\binding\target\tuscany-notification-binding-1.0-incubating-SNAPSHOT
.jar;\Documents and Settings\Administrator\.m2\repository\stax\stax\1.1.1-dev\st
ax-1.1.1-dev.jar;\Devt\tuscany-sca-distr\tuscany-sca-1.0-incubating-SNAPSHOT\lib
\tuscany-sca-manifest.jar" org.apache.tuscany.notification.remoteProducer.Traffi
cAdvisoryServer

I get the following:

*** Activating local notification module
*** Activating notification binding module, localBaseUrl [http://spyder.watson.i
bm.com:8080]
*** binding ntm [null], notificationType [trafficAdvisory]
>>> NotificationImplementationLoader.resolve, tmpUri [TrafficAdvisoryNotificatio
nTest.componentType], ctUri [jar:file:/C:/Devt/NotificationComponents/samples/re
mote-producer/target/tuscany-notification-remote-producer-sample-1.0-incubating-
SNAPSHOT.jar!/TrafficAdvisoryNotificationTest.componentType]
Composite assembly problem: No implementation for component: TrafficAdvisoryProd
ucer
Composite assembly problem: Reference not found for component reference: Traffic
AdvisoryProducer/destination
org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: org.
apache.tuscany.sca.core.runtime.ActivationException: java.lang.NullPointerExcept
ion
        at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
omain.java:230)
        at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.
java:90)
        at org.apache.tuscany.notification.remoteProducer.TrafficAdvisoryServer.
main(TrafficAdvisoryServer.java:31)
Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.run
time.ActivationException: java.lang.NullPointerException
        at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
aultSCADomain.java:136)
        at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
omain.java:212)
        ... 2 more
Caused by: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.Nu
llPointerException
        at org.apache.tuscany.sca.core.runtime.DefaultCompositeActivator.start(D
efaultCompositeActivator.java:573)
        at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
aultSCADomain.java:134)
        ... 3 more
Caused by: java.lang.NullPointerException
        at org.apache.tuscany.sca.core.runtime.DefaultCompositeActivator.createW
ires(DefaultCompositeActivator.java:357)
        at org.apache.tuscany.sca.core.runtime.DefaultCompositeActivator.createR
untimeWires(DefaultCompositeActivator.java:251)
        at org.apache.tuscany.sca.core.runtime.DefaultCompositeActivator.start(D
efaultCompositeActivator.java:570)
        ... 4 more

which is pretty much the same issue.

I have verified that the modules dir in the distribution contains 
tuscany-interface-java-runtime-1.0-incubating-SNAPSHOT.jar, and that the 
manifest file in lib\tuscany-sca-manifest.jar contains a reference to it.

I should point out that the main build of the trunk gave me a failure in

[INFO] -------------------------------------------------------------------------
---
[INFO] Building Apache Tuscany DAS Pojo Service Sample - Service
[INFO]    task-segment: [install]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://people.apache.org/repo/m2-incubating-repository/org/apache/t
uscany/das/tuscany-das-rdb/1.0-incubating-SNAPSHOT/tuscany-das-rdb-1.0-incubatin
g-SNAPSHOT.pom
[WARNING] Unable to get resource from repository apache.incubator (http://people
.apache.org/repo/m2-incubating-repository)
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tus
cany/das/tuscany-das-rdb/1.0-incubating-SNAPSHOT/tuscany-das-rdb-1.0-incubating-
SNAPSHOT.pom
[WARNING] Unable to get resource from repository apache.snapshots (http://people
.apache.org/repo/m2-snapshot-repository)
Downloading: http://people.apache.org/repo/m2-incubating-repository/org/apache/t
uscany/das/tuscany-das-rdb/1.0-incubating-SNAPSHOT/tuscany-das-rdb-1.0-incubatin
g-SNAPSHOT.jar
[WARNING] Unable to get resource from repository apache.incubator (http://people
.apache.org/repo/m2-incubating-repository)
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tus
cany/das/tuscany-das-rdb/1.0-incubating-SNAPSHOT/tuscany-das-rdb-1.0-incubating-
SNAPSHOT.jar
[WARNING] Unable to get resource from repository apache.snapshots (http://people
.apache.org/repo/m2-snapshot-repository)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.apache.tuscany.das:tuscany-das-rdb:jar:1.0-incubating-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.tuscany.das -DartifactId=tus
cany-das-rdb \
          -Dversion=1.0-incubating-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file


  Path to dependency:
        1) org.apache.tuscany.sca:samples-das-service:jar:1.0-incubating-SNAPSHO
T
        2) org.apache.tuscany.das:tuscany-das-rdb:jar:1.0-incubating-SNAPSHOT

----------
1 required artifact is missing.

for artifact:
  org.apache.tuscany.sca:samples-das-service:jar:1.0-incubating-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  apache.incubator (http://people.apache.org/repo/m2-incubating-repository),
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository)

but building the distribuition after that was successful, so I was hoping the 
distro was ok to be used.


> 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 [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to