On Tue, May 18, 2010 at 5:44 PM, Jean-Sebastien Delfino <[email protected]> wrote: > Can you point me a good example or test case showing how to bootstrap a > Tuscany runtime? > > I have the URL of a contribution, the qname of a composite in that > contribution, the name of a component in that composite. I'd like to start a > Tuscany runtime instance and run the component on it. > > I remember several attempts at different designs and APIs to manage Tuscany > runtime instances, but I'm not sure which of these now works with the 2.x > runtime. > > The tests in samples/launcher-embedded-jse fail for me with this error: > > Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.441 sec > <<< FAILURE! > testCOntributionBindingSCACalculator(launcher.LauncherTestCase) Time > elapsed: 1.939 sec <<< ERROR! > java.lang.IllegalStateException: > org.apache.tuscany.sca.contribution.processor.ContributionReadException: > java.io.FileNotFoundException: > /home/delfinoj/SCA/Source/tuscany-sca-java/samples/launcher-embedded-jse/../contribution-binding-sca-calculator/target/classes > (No such file or directory) > at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173) > at launcher.RuntimeIntegration.startNode(RuntimeIntegration.java:35) > at > launcher.SampleJSELauncher.launchBindingSCACalculator(SampleJSELauncher.java:61) > at launcher.SampleJSELauncher.main(SampleJSELauncher.java:48) > at > launcher.LauncherTestCase.testCOntributionBindingSCACalculator(LauncherTestCase.java:30) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) > at org.junit.runners.ParentRunner.run(ParentRunner.java:236) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) > > > Thanks > -- > Jean-Sebastien >
Hi Jean-Sebastien Raymond pipped me to the post. There are many different variations on the createNode() operation so if that doesn't precisely suit there may be an alternative that does. Note. I'm just working on the samples and launchers now. I need to change it to look for the jars rather than the target/classes. In the mean time did you compile the contribution? It's complaining that it can't find the directory where the contribution is. Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com
