Hi,

I'm new to SCA and I'm trying to do a little example.

My very simple use case :

A ProviderComponent implemented in Java in a Provider composite. All this in
a jar file.
Alone works fine.

A ConsumerComponent implemented in Java in a Consumer composite in another
jar file.
This component references Provider.
Problem !

When I run the test, I receive an error (see below) :
Composite assembly problem: Component reference target not found:
ProviderComponent
and sometimes it's the ConsumerComponent which is not found.

I'am missing something.

I tried to attach the full code (zip 29K) to this e-mail but it's rejected.
I can send it if somebody could look at it.

Thanks in advance.

Patrick


H:\IT\Logiciel_GI\sca>mvn test
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Greisch Tuscany SCA
[INFO]   Service Provider Sample
[INFO]   Service Consumer Sample
[INFO] ---------------------------------------------------------------------
-------
[INFO] Building Greisch Tuscany SCA
[INFO]    task-segment: [test]
[INFO] ---------------------------------------------------------------------
-------
[INFO] No goals needed for project - skipping
[INFO] ---------------------------------------------------------------------
-------
[INFO] Building Service Provider Sample
[INFO]    task-segment: [test]
[INFO] ---------------------------------------------------------------------
-------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://people.apache.org/repo/m2-incubating-repository/wsdl4j/wsdl4j/1.6.2/w
sdl4j-1.6.2.pom
Downloading:
http://www.ibiblio.net/pub/packages/maven2/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.
pom
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
H:\IT\Logiciel_GI\sca\provider\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running provider.ProviderTestCase
Arg: Provision
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.344 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ---------------------------------------------------------------------
-------
[INFO] Building Service Consumer Sample
[INFO]    task-segment: [test]
[INFO] ---------------------------------------------------------------------
-------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
H:\IT\Logiciel_GI\sca\consumer\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running consumer.ConsumerTestCase
Composite assembly problem: Component reference target not found:
ProviderComponent
Consumer Arg: Provision
java.lang.NullPointerException
        at consumer.ConsumerImpl.consume(ConsumerImpl.java:17)
        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.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invo
keTarget(JavaTargetInvoker.java:1
12)
        at
org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invo
ke(JavaTargetInvoker.java:134)
        at
org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.i
nvoke(TargetInvokerInvoker.java:4
6)
        at
org.apache.tuscany.sca.core.invocation.AbstractInvocationHandler.invoke(Abst
ractInvocationHandler.java:84)
        at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvoca
tionHandler.java:73)
        at $Proxy6.consume(Unknown Source)
        at consumer.ConsumerTestCase.test(ConsumerTestCase.java:23)
        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:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        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(Ab
stractDirectoryTestSuite.java:138
)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractD
irectoryTestSuite.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(SurefireB
ooter.java:290)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818
)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.281 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO]
[INFO] ---------------------------------------------------------------------
---
[INFO] Reactor Summary:
[INFO] ---------------------------------------------------------------------
---
[INFO] Greisch Tuscany SCA ................................... SUCCESS
[0.016s]
[INFO] Service Provider Sample ............................... SUCCESS
[17.781s]
[INFO] Service Consumer Sample ............................... SUCCESS
[10.344s]
[INFO] ---------------------------------------------------------------------
---
[INFO] ---------------------------------------------------------------------
---
[INFO] BUILD SUCCESSFUL
[INFO] ---------------------------------------------------------------------
---
[INFO] Total time: 29 seconds
[INFO] Finished at: Wed May 30 13:15:25 CEST 2007
[INFO] Final Memory: 5M/10M
[INFO] ---------------------------------------------------------------------
---


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to