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 <is...@verizon.net> on 2006/07/14 19:00:14 UTC

Problem running supply chain sample

I am trying to get the supply chain sample to work on chianti to have a test case for the one-way rework based on the callback discussion. I copied the supplychain dir from the main trunk and changed pom.xml, the stand-alone client and the test case, and I moved sca.module to default.scdl under META-INF/sca and changed it to conform to the latest spec.

When I try to build it with mvn from chianti\sca\samples\supplychain I get the following error:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running supplychain.SupplyChainClientTestCase
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.459 sec <<< FA
ILURE!
test(supplychain.SupplyChainClientTestCase)  Time elapsed: 0.429 sec  <<< ERROR!

org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object factory no
t registered for scope [STATELESS]
        at org.apache.tuscany.core.component.scope.ScopeRegistryImpl.getScopeCon
tainer(ScopeRegistryImpl.java:47)
        at org.apache.tuscany.core.implementation.java.JavaComponentBuilder.buil
d(JavaComponentBuilder.java:72)
        at org.apache.tuscany.core.implementation.java.JavaComponentBuilder.buil
d(JavaComponentBuilder.java:56)
        at org.apache.tuscany.core.builder.BuilderRegistryImpl.build(BuilderRegi
stryImpl.java:99)
        at org.apache.tuscany.core.implementation.system.builder.SystemComposite
Builder.build(SystemCompositeBuilder.java:96)
        at org.apache.tuscany.core.builder.BuilderRegistryImpl.build(BuilderRegi
stryImpl.java:99)
        at org.apache.tuscany.core.deployer.DeployerImpl.build(DeployerImpl.java
:125)
        at org.apache.tuscany.core.deployer.DeployerImpl.deploy(DeployerImpl.jav
a:91)
        at org.apache.tuscany.core.launcher.Launcher.bootApplication(Launcher.ja
va:188)
        at org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:40)
        at supplychain.SupplyChainClientTestCase.setUp(SupplyChainClientTestCase
.java:35)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        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)
        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.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:210)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:135)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:122)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        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:225)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:747)

...

[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri Jul 14 12:46:50 EDT 2006
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

Notice that I have not been able to complete an entire build due to the jaxb/databinding
integration test. Interestingly, if I do a mvn clean at the root and then mvn -e from sca
(after commenting out databinding-jaxb from sca/databinding/pom.xml) then I get a
successful build, but I still can't get it to build from the top.

In any case, I can zip and post the contents of the supplychain sample if it would help.

Help is appreciated.

Thanks

Re: Problem running supply chain sample

Posted by Jim Marino <jm...@myromatours.com>.
Hi Ignacio,

Could you submit the sample and I'll patch it in. Regarding the  
issue, I believe it's a bug with StatelessScopeObjectFactory not  
being registered with the ScopeRegistry at startup, which is  
responsible for creating StatelessScopeContainer. Hence, the runtime  
is saying it doesn't have the stateless scope.

To get around your problem as a temporary fix, try changing the scope  
of your components to @Scope("MODULE"). In the meantime, if someone  
is interested in getting involved in working with the scope  
containers and extensibility, fixing the bug may be a good way to  
start (of course I'll help out). There is still some work to be done  
on getting scopes fully extensible as well.

So, if someone is interested, let me know, otherwise I'll fix it.

Jim


On Jul 14, 2006, at 10:00 AM, Ignacio Silva-Lepe wrote:

> I am trying to get the supply chain sample to work on chianti to  
> have a test case for the one-way rework based on the callback  
> discussion. I copied the supplychain dir from the main trunk and  
> changed pom.xml, the stand-alone client and the test case, and I  
> moved sca.module to default.scdl under META-INF/sca and changed it  
> to conform to the latest spec.
>
> When I try to build it with mvn from chianti\sca\samples 
> \supplychain I get the following error:
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running supplychain.SupplyChainClientTestCase
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:  
> 0.459 sec <<< FA
> ILURE!
> test(supplychain.SupplyChainClientTestCase)  Time elapsed: 0.429  
> sec  <<< ERROR!
>
> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope  
> object factory no
> t registered for scope [STATELESS]
>         at  
> org.apache.tuscany.core.component.scope.ScopeRegistryImpl.getScopeCon
> tainer(ScopeRegistryImpl.java:47)
>         at  
> org.apache.tuscany.core.implementation.java.JavaComponentBuilder.buil
> d(JavaComponentBuilder.java:72)
>         at  
> org.apache.tuscany.core.implementation.java.JavaComponentBuilder.buil
> d(JavaComponentBuilder.java:56)
>         at org.apache.tuscany.core.builder.BuilderRegistryImpl.build 
> (BuilderRegi
> stryImpl.java:99)
>         at  
> org.apache.tuscany.core.implementation.system.builder.SystemComposite
> Builder.build(SystemCompositeBuilder.java:96)
>         at org.apache.tuscany.core.builder.BuilderRegistryImpl.build 
> (BuilderRegi
> stryImpl.java:99)
>         at org.apache.tuscany.core.deployer.DeployerImpl.build 
> (DeployerImpl.java
> :125)
>         at org.apache.tuscany.core.deployer.DeployerImpl.deploy 
> (DeployerImpl.jav
> a:91)
>         at org.apache.tuscany.core.launcher.Launcher.bootApplication 
> (Launcher.ja
> va:188)
>         at org.apache.tuscany.test.SCATestCase.setUp 
> (SCATestCase.java:40)
>         at supplychain.SupplyChainClientTestCase.setUp 
> (SupplyChainClientTestCase
> .java:35)
>         at junit.framework.TestCase.runBare(TestCase.java:125)
>         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)
>         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.junit.JUnitTestSet.execute 
> (JUnitTestSet.jav
> a:210)
>         at  
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> tSet(AbstractDirectoryTestSuite.java:135)
>         at  
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
> stractDirectoryTestSuite.java:122)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>         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:225)
>         at org.apache.maven.surefire.booter.SurefireBooter.main 
> (SurefireBooter.j
> ava:747)
>
> ...
>
> [INFO]  
> ---------------------------------------------------------------------- 
> --
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Fri Jul 14 12:46:50 EDT 2006
> [INFO] Final Memory: 4M/8M
> [INFO]  
> ---------------------------------------------------------------------- 
> --
>
> Notice that I have not been able to complete an entire build due to  
> the jaxb/databinding
> integration test. Interestingly, if I do a mvn clean at the root  
> and then mvn -e from sca
> (after commenting out databinding-jaxb from sca/databinding/ 
> pom.xml) then I get a
> successful build, but I still can't get it to build from the top.
>
> In any case, I can zip and post the contents of the supplychain  
> sample if it would help.
>
> Help is appreciated.
>
> Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org