|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #483436 is a reply to message #483399] |
Tue, 01 September 2009 15:39 |
|
Hi William,
For Tuscany 2.x, an exception would be normal, as it is not yet
supported. I started to work on it but I could not find time to finish it.
So, deploying an SCA application with SCA Tools can only be done with
Tuscany 1.x for the moment.
For Tuscany 1.5, and given the exception you got, it seems it is an
error in your SCA application and not in the deployment tool. The
deployment tool creates a client smilar to the one you wrote below
(demoV1Main).
What happens if you remove the sawsdl annotations from your composite?
Does it solve the problem?
About Tuscany 2, I think it is related to the OASIS namespace, which is
not yet covered by the released SCA Tools. It is on the roadmap. You
should replace the "sca" namespace in your composite by the OASIS one
(it must be available in the samples running on Tuscany 2).
Let me know if it helps.
Vincent.
William Woodman a écrit :
> newbie here wonder if someone can help
>
> I have gallileo with stp 2.0.0.9 and 1.6.13 java vm
>
> i have downloaded v1.5 and v2 m3 tuscany binarys and installed on
> harddrive.
>
> have created two user librarries in eclipse tuscnay v1 libs - pointed at
> tuscany 1.5/lib/tuscany_sca_all.jar
>
> and tuscany v2 libs - pointed to tuscany v2m3/module/*.jar (cant find a
> /lib directory in V2 at all - is that intentional??)
>
> created two user projects for "hello world" app quick test
> used the sca editor to create demoSCA.composite as follows in both v1
> and v2 apps
>
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
> targetNamespace="http://eclipse.org/demoSCA/demoSCA">
> <sca:component name="HelloWorldComponent">
> <sca:implementation.java class="HelloWorldImpl"/>
> <sca:service name="helloWorld">
> <sca:interface.java interface="HelloWorld"/>
> <sawsdl:semantic.sawsdl/>
> </sca:service>
> <sawsdl:semantic.sawsdl/>
> </sca:component>
> <sca:service name="helloWorld" promote="HelloWorldComponent/helloWorld">
> <sca:interface.java interface="HelloWorld"/>
> </sca:service>
> </sca:composite>
>
> I have a simple interface (HelloWorld.java) marked as @Remotable (one
> method)
>
> and a simple implementation marked with @Service (HelloWorld.class)
> which just returns a String
>
> I have standalone client class to drive the simple project
> import org.apache.tuscany.sca.host.embedded.SCADomain;
>
> //demoV1SCA.java
> public class demoV1Main {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
>
> //create new Tuscany node
>
> System.out.println("starting new domain\n");
>
> // Locate the service using SCA APIs
> SCADomain domain = SCADomain.newInstance("demoSCA");
>
> System.out.println("lookup service\n");
> HelloWorld hello = domain.getService(HelloWorld.class,
> "HelloWorld");
> // Calculate
> System.out.println("say " + hello.helloWorld());
> try
> {
> System.in.read();
> } catch (Exception e)
> {
> System.exit(0);
> }
>
> SCADomain.removeInstance(domain);
> }
>
>
> }
>
> when i run this as an applicaqtion it errors with
> starting new domain
>
> 01-Sep-2009 14:05:49 org.apache.tuscany.sca.node.impl.NodeImpl <init>
> INFO: Creating node: demoSCA
> 01-Sep-2009 14:05:49
> org.apache.tuscany.sca.implementation.java.module.JavaRuntim eModuleActivator
> start
> WARNING: Class proxys not supported due to
> NoClassDefFoundError:net/sf/cglib/proxy/Callback
> 01-Sep-2009 14:05:49
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
> WARNING: Exception starting module
> org.apache.tuscany.sca.core.databinding.module.DataBindingMo duleActivator
> :org/apache/axiom/om/OMElement
> 01-Sep-2009 14:05:49
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
> WARNING: Exception starting module
> org.apache.tuscany.sca.http.jetty.module.JettyRuntimeModuleA ctivator
> :javax/servlet/ServletException
> 01-Sep-2009 14:05:50
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor
>
> SEVERE: IllegalStateException
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException:
> org.apache.tuscany.sca.core.assembly.ActivationException:
> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
> org.apache.neethi.Policy
> at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)
> at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANo deFromClassLoader(NodeFactoryImpl.java:37)
>
> at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.i nit(DefaultSCADomain.java:178)
>
> at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init >(DefaultSCADomain.java:100)
>
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInst ance(SCADomain.java:182)
>
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(S CADomain.java:63)
>
> at demoV1Main.main(demoV1Main.java:22)
> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException:
> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
> org.apache.neethi.Policy
> at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:305)
>
> at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(R untimeBootStrapper.java:187)
>
> at
> org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeIm pl.java:465)
> at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:193)
> ... 6 more
> Caused by:
> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
> org.apache.neethi.Policy
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 61)
>
> at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:278)
>
> ... 9 more
> Caused by: java.lang.IllegalStateException:
> java.lang.ClassNotFoundException: org.apache.neethi.Policy
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:378)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.addArtifactProcessor(DefaultStA XArtifactProcessorExtensionPoint.java:103)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.loadArtifactProcessors(DefaultS tAXArtifactProcessorExtensionPoint.java:191)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:125)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:56)
>
> at
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAX ArtifactProcessor.read(ExtensibleStAXArtifactProcessor.java: 136)
>
> at
> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:156)
>
> at
> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:56)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultURLArti factProcessorExtensionPoint$LazyURLArtifactProcessor.read(De faultURLArtifactProcessorExtensionPoint.java:222)
>
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:57)
>
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:55)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 55)
>
> ... 10 more
> Caused by: java.lang.ClassNotFoundException: org.apache.neethi.Policy
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at
> org.apache.tuscany.sca.extensibility.ClassLoaderServiceDisco verer$ServiceDeclarationImpl.loadClass(ClassLoaderServiceDis coverer.java:88)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:376)
>
> ... 22 more
>
>
> and my version 2 app (cant find an SCADOmain.class in version 2 build -
> so did a google search and came up with somthing like this
> //demoV2SCA
> import org.apache.tuscany.sca.node.Client;
> import org.apache.tuscany.sca.node.Node;
> import org.apache.tuscany.sca.node.NodeFactory;
>
>
> public class demoV2Main {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
>
> //create new Tuscany node
> NodeFactory nf = NodeFactory.newInstance();
>
> //String root =
> ContributionLocationHelper.getContributionLocation("HelloWorld ");
> //Contribution contribution = new Contribution(root, root);
>
> Node node = nf.createNode();
>
> System.out.println("start tuscany node \n");
> node.start();
> HelloWorld hello =
> ((Client)node).getService(HelloWorld.class, "HelloWorld");
> // Calculate
> System.out.println("say " + hello.helloWorld());
> try
> {
> System.in.read();
> } catch (Exception e)
> {
> System.exit(0);
> }
> node.stop();
> }
>
>
> }
>
> which errors with
> Exception in thread "main" org.oasisopen.sca.ServiceRuntimeException: No
> SCA contributions are found on the classpath
> at
> org.apache.tuscany.sca.node.NodeFactory.createNode(NodeFacto ry.java:367)
> at demoV2Main.main(demoV2Main.java:25)
>
>
> so what am i doing wrong and how do i get a simple app up and running in
> eclipse
>
> Any help greatfully received - i have got stuck i think
>
--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #483449 is a reply to message #483436] |
Tue, 01 September 2009 15:55 |
Stephane Drapeau Messages: 199 Registered: July 2009 |
Senior Member |
|
|
Hi,
I think that it's a classpath problem.
> Caused by: java.lang.ClassNotFoundException: org.apache.neethi.Policy
Try to add neethi?.jar in your classpath. You can find it in tuscany/lib/
The best way to begin is to add all the libraries of Tuscany in your
classpath.
As Vincent said, you can also use the deployment tool [0]
Regards,
Stephane Drapeau
Obeo
[0]:
http://wiki.eclipse.org/STP/SCA_Component/SCA_Java_Run_and_D ebug_Tuscany
Vincent Zurczak a écrit :
> Hi William,
>
> For Tuscany 2.x, an exception would be normal, as it is not yet
> supported. I started to work on it but I could not find time to finish it.
>
> So, deploying an SCA application with SCA Tools can only be done with
> Tuscany 1.x for the moment.
>
> For Tuscany 1.5, and given the exception you got, it seems it is an
> error in your SCA application and not in the deployment tool. The
> deployment tool creates a client smilar to the one you wrote below
> (demoV1Main).
>
> What happens if you remove the sawsdl annotations from your composite?
> Does it solve the problem?
>
> About Tuscany 2, I think it is related to the OASIS namespace, which is
> not yet covered by the released SCA Tools. It is on the roadmap. You
> should replace the "sca" namespace in your composite by the OASIS one
> (it must be available in the samples running on Tuscany 2).
>
>
> Let me know if it helps.
>
>
> Vincent.
>
>
>
>
> William Woodman a écrit :
>> newbie here wonder if someone can help
>>
>> I have gallileo with stp 2.0.0.9 and 1.6.13 java vm
>>
>> i have downloaded v1.5 and v2 m3 tuscany binarys and installed on
>> harddrive.
>>
>> have created two user librarries in eclipse tuscnay v1 libs - pointed
>> at tuscany 1.5/lib/tuscany_sca_all.jar
>>
>> and tuscany v2 libs - pointed to tuscany v2m3/module/*.jar (cant find
>> a /lib directory in V2 at all - is that intentional??)
>>
>> created two user projects for "hello world" app quick test
>> used the sca editor to create demoSCA.composite as follows in both v1
>> and v2 apps
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
>> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
>> targetNamespace="http://eclipse.org/demoSCA/demoSCA">
>> <sca:component name="HelloWorldComponent">
>> <sca:implementation.java class="HelloWorldImpl"/>
>> <sca:service name="helloWorld">
>> <sca:interface.java interface="HelloWorld"/>
>> <sawsdl:semantic.sawsdl/>
>> </sca:service>
>> <sawsdl:semantic.sawsdl/>
>> </sca:component>
>> <sca:service name="helloWorld" promote="HelloWorldComponent/helloWorld">
>> <sca:interface.java interface="HelloWorld"/>
>> </sca:service>
>> </sca:composite>
>>
>> I have a simple interface (HelloWorld.java) marked as @Remotable (one
>> method)
>>
>> and a simple implementation marked with @Service (HelloWorld.class)
>> which just returns a String
>>
>> I have standalone client class to drive the simple project
>> import org.apache.tuscany.sca.host.embedded.SCADomain;
>>
>> //demoV1SCA.java
>> public class demoV1Main {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) {
>> // TODO Auto-generated method stub
>> //create new Tuscany node
>> System.out.println("starting new domain\n");
>>
>> // Locate the service using SCA APIs
>> SCADomain domain = SCADomain.newInstance("demoSCA");
>> System.out.println("lookup service\n");
>> HelloWorld hello = domain.getService(HelloWorld.class,
>> "HelloWorld");
>> // Calculate
>> System.out.println("say " + hello.helloWorld());
>> try
>> {
>> System.in.read();
>> } catch (Exception e)
>> {
>> System.exit(0);
>> }
>>
>> SCADomain.removeInstance(domain);
>> }
>>
>>
>> }
>>
>> when i run this as an applicaqtion it errors with
>> starting new domain
>>
>> 01-Sep-2009 14:05:49 org.apache.tuscany.sca.node.impl.NodeImpl <init>
>> INFO: Creating node: demoSCA
>> 01-Sep-2009 14:05:49
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntim eModuleActivator
>> start
>> WARNING: Class proxys not supported due to
>> NoClassDefFoundError:net/sf/cglib/proxy/Callback
>> 01-Sep-2009 14:05:49
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
>> WARNING: Exception starting module
>> org.apache.tuscany.sca.core.databinding.module.DataBindingMo duleActivator
>> :org/apache/axiom/om/OMElement
>> 01-Sep-2009 14:05:49
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
>> WARNING: Exception starting module
>> org.apache.tuscany.sca.http.jetty.module.JettyRuntimeModuleA ctivator
>> :javax/servlet/ServletException
>> 01-Sep-2009 14:05:50
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor
>>
>> SEVERE: IllegalStateException
>> Exception in thread "main" org.osoa.sca.ServiceRuntimeException:
>> org.apache.tuscany.sca.core.assembly.ActivationException:
>> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
>> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
>> org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)
>> at
>> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANo deFromClassLoader(NodeFactoryImpl.java:37)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.i nit(DefaultSCADomain.java:178)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init >(DefaultSCADomain.java:100)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInst ance(SCADomain.java:182)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(S CADomain.java:63)
>>
>> at demoV1Main.main(demoV1Main.java:22)
>> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException:
>> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
>> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
>> org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:305)
>>
>> at
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(R untimeBootStrapper.java:187)
>>
>> at
>> org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeIm pl.java:465)
>> at
>> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:193)
>> ... 6 more
>> Caused by:
>> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
>> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
>> org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 61)
>>
>> at
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:278)
>>
>> ... 9 more
>> Caused by: java.lang.IllegalStateException:
>> java.lang.ClassNotFoundException: org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:378)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.addArtifactProcessor(DefaultStA XArtifactProcessorExtensionPoint.java:103)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.loadArtifactProcessors(DefaultS tAXArtifactProcessorExtensionPoint.java:191)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:125)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:56)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.ExtensibleStAX ArtifactProcessor.read(ExtensibleStAXArtifactProcessor.java: 136)
>>
>> at
>> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:156)
>>
>> at
>> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:56)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultURLArti factProcessorExtensionPoint$LazyURLArtifactProcessor.read(De faultURLArtifactProcessorExtensionPoint.java:222)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:57)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:55)
>>
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 55)
>>
>> ... 10 more
>> Caused by: java.lang.ClassNotFoundException: org.apache.neethi.Policy
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> at
>> org.apache.tuscany.sca.extensibility.ClassLoaderServiceDisco verer$ServiceDeclarationImpl.loadClass(ClassLoaderServiceDis coverer.java:88)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:376)
>>
>> ... 22 more
>>
>>
>> and my version 2 app (cant find an SCADOmain.class in version 2 build
>> - so did a google search and came up with somthing like this
>> //demoV2SCA
>> import org.apache.tuscany.sca.node.Client;
>> import org.apache.tuscany.sca.node.Node;
>> import org.apache.tuscany.sca.node.NodeFactory;
>>
>>
>> public class demoV2Main {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) {
>> // TODO Auto-generated method stub
>> //create new Tuscany node NodeFactory nf =
>> NodeFactory.newInstance();
>> //String root =
>> ContributionLocationHelper.getContributionLocation("HelloWorld ");
>> //Contribution contribution = new Contribution(root, root);
>>
>> Node node = nf.createNode();
>>
>> System.out.println("start tuscany node \n");
>> node.start();
>> HelloWorld hello =
>> ((Client)node).getService(HelloWorld.class, "HelloWorld");
>> // Calculate
>> System.out.println("say " + hello.helloWorld());
>> try
>> {
>> System.in.read();
>> } catch (Exception e)
>> {
>> System.exit(0);
>> }
>> node.stop();
>> }
>>
>>
>> }
>>
>> which errors with
>> Exception in thread "main" org.oasisopen.sca.ServiceRuntimeException:
>> No SCA contributions are found on the classpath
>> at
>> org.apache.tuscany.sca.node.NodeFactory.createNode(NodeFacto ry.java:367)
>> at demoV2Main.main(demoV2Main.java:25)
>>
>>
>> so what am i doing wrong and how do i get a simple app up and running
>> in eclipse
>>
>> Any help greatfully received - i have got stuck i think
>>
>
>
|
|
|
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #483728 is a reply to message #483677] |
Wed, 02 September 2009 17:58 |
|
Hi William,
In your client, you have written
> // Locate the service using SCA APIs
> SCADomain domain = SCADomain.newInstance("demoSCA");
Can you check what happens if you replace it by
> // Locate the service using SCA APIs
> SCADomain domain = SCADomain.newInstance("demoSCA.composite");
On the link Stéphane pointed to, the composite extension is provided in
the new instance argument. If the composite is in the "src" folder of
your project, the service should be found.
Vincent.
William Woodman a écrit :
>
>
> i've attached a picture of my eclipse project tree.
>
> Ive done two variants -
> one with the composite file in src/resources dir
> and one just top level with no substructure.
>
> eclipse wont let you add src/resources to class path as top level src is
> all ready in.
>
> either way i get this same error about the contribution
> starting new domain
>
> 02-Sep-2009 15:37:17 org.apache.tuscany.sca.node.impl.NodeImpl <init>
> INFO: Creating node: demoSCA.composite
> 02-Sep-2009 15:37:17 org.apache.tuscany.sca.node.impl.NodeImpl
> configureNode
> INFO: Loading contribution:
> file:/C:/documents%20and%20settings/802518659/workspace/demo V1SCA/bin/
> 02-Sep-2009 15:37:19 org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: demoSCA.composite
> lookup service
>
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException: The
> service HelloWorld has not been contributed to the domain
> at org.apache.tuscany.sca.node.impl.NodeImpl.getServiceReferenc
> e(NodeImpl.java:779)
> at org.apache.tuscany.sca.node.impl.NodeImpl.getService(NodeImp
> l.java:746)
> at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.g
> etService(DefaultSCADomain.java:227)
> at demoV1Main.main(demoV1Main.java:25)
>
> what exactly in SCA terms is a contribution ?
>
>
> here is my latest .composite file
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
> targetNamespace="http://eclipse.org/demoV1_1SCA/src/resources/demoSCA">
> <sca:component name="HelloWorldComponent">
> <sca:implementation.java class="HelloWorldImpl"/>
> <sca:service name="HelloWorld"/>
> </sca:component>
> <sca:service name="HelloWorld" promote="HelloWorldComponent/HelloWorld"/>
> </sca:composite>
>
> have i got this right now? thanks in advance
--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #484187 is a reply to message #484152] |
Fri, 04 September 2009 14:21 |
|
Hi William,
William Woodman a écrit :
> whats wierd is that the generated targetNamespace in the WSDL is the
> Reverse of my source path i.e. http://helloWorld.org.will
>
> is that what it should do ? i'd have expected it to come out like in
> the same order as the path. Is this just another ideosyncratic tuscany
> v1.5 ' feature' or as expected?
Yes, it is normal.
When mapping Java to XML (and vice-versa), Java package names are
written in the reversed order to generate the target namespace.
Vincent.
--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #576056 is a reply to message #483399] |
Tue, 01 September 2009 15:39 |
|
Hi William,
For Tuscany 2.x, an exception would be normal, as it is not yet
supported. I started to work on it but I could not find time to finish it.
So, deploying an SCA application with SCA Tools can only be done with
Tuscany 1.x for the moment.
For Tuscany 1.5, and given the exception you got, it seems it is an
error in your SCA application and not in the deployment tool. The
deployment tool creates a client smilar to the one you wrote below
(demoV1Main).
What happens if you remove the sawsdl annotations from your composite?
Does it solve the problem?
About Tuscany 2, I think it is related to the OASIS namespace, which is
not yet covered by the released SCA Tools. It is on the roadmap. You
should replace the "sca" namespace in your composite by the OASIS one
(it must be available in the samples running on Tuscany 2).
Let me know if it helps.
Vincent.
William Woodman a écrit :
> newbie here wonder if someone can help
>
> I have gallileo with stp 2.0.0.9 and 1.6.13 java vm
>
> i have downloaded v1.5 and v2 m3 tuscany binarys and installed on
> harddrive.
>
> have created two user librarries in eclipse tuscnay v1 libs - pointed at
> tuscany 1.5/lib/tuscany_sca_all.jar
>
> and tuscany v2 libs - pointed to tuscany v2m3/module/*.jar (cant find a
> /lib directory in V2 at all - is that intentional??)
>
> created two user projects for "hello world" app quick test
> used the sca editor to create demoSCA.composite as follows in both v1
> and v2 apps
>
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
> targetNamespace="http://eclipse.org/demoSCA/demoSCA">
> <sca:component name="HelloWorldComponent">
> <sca:implementation.java class="HelloWorldImpl"/>
> <sca:service name="helloWorld">
> <sca:interface.java interface="HelloWorld"/>
> <sawsdl:semantic.sawsdl/>
> </sca:service>
> <sawsdl:semantic.sawsdl/>
> </sca:component>
> <sca:service name="helloWorld" promote="HelloWorldComponent/helloWorld">
> <sca:interface.java interface="HelloWorld"/>
> </sca:service>
> </sca:composite>
>
> I have a simple interface (HelloWorld.java) marked as @Remotable (one
> method)
>
> and a simple implementation marked with @Service (HelloWorld.class)
> which just returns a String
>
> I have standalone client class to drive the simple project
> import org.apache.tuscany.sca.host.embedded.SCADomain;
>
> //demoV1SCA.java
> public class demoV1Main {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
>
> //create new Tuscany node
>
> System.out.println("starting new domain\n");
>
> // Locate the service using SCA APIs
> SCADomain domain = SCADomain.newInstance("demoSCA");
>
> System.out.println("lookup service\n");
> HelloWorld hello = domain.getService(HelloWorld.class,
> "HelloWorld");
> // Calculate
> System.out.println("say " + hello.helloWorld());
> try
> {
> System.in.read();
> } catch (Exception e)
> {
> System.exit(0);
> }
>
> SCADomain.removeInstance(domain);
> }
>
>
> }
>
> when i run this as an applicaqtion it errors with
> starting new domain
>
> 01-Sep-2009 14:05:49 org.apache.tuscany.sca.node.impl.NodeImpl <init>
> INFO: Creating node: demoSCA
> 01-Sep-2009 14:05:49
> org.apache.tuscany.sca.implementation.java.module.JavaRuntim eModuleActivator
> start
> WARNING: Class proxys not supported due to
> NoClassDefFoundError:net/sf/cglib/proxy/Callback
> 01-Sep-2009 14:05:49
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
> WARNING: Exception starting module
> org.apache.tuscany.sca.core.databinding.module.DataBindingMo duleActivator
> :org/apache/axiom/om/OMElement
> 01-Sep-2009 14:05:49
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
> WARNING: Exception starting module
> org.apache.tuscany.sca.http.jetty.module.JettyRuntimeModuleA ctivator
> :javax/servlet/ServletException
> 01-Sep-2009 14:05:50
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor
>
> SEVERE: IllegalStateException
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException:
> org.apache.tuscany.sca.core.assembly.ActivationException:
> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
> org.apache.neethi.Policy
> at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)
> at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANo deFromClassLoader(NodeFactoryImpl.java:37)
>
> at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.i nit(DefaultSCADomain.java:178)
>
> at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init >(DefaultSCADomain.java:100)
>
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInst ance(SCADomain.java:182)
>
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(S CADomain.java:63)
>
> at demoV1Main.main(demoV1Main.java:22)
> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException:
> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
> org.apache.neethi.Policy
> at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:305)
>
> at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(R untimeBootStrapper.java:187)
>
> at
> org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeIm pl.java:465)
> at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:193)
> ... 6 more
> Caused by:
> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
> org.apache.neethi.Policy
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 61)
>
> at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:278)
>
> ... 9 more
> Caused by: java.lang.IllegalStateException:
> java.lang.ClassNotFoundException: org.apache.neethi.Policy
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:378)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.addArtifactProcessor(DefaultStA XArtifactProcessorExtensionPoint.java:103)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.loadArtifactProcessors(DefaultS tAXArtifactProcessorExtensionPoint.java:191)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:125)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:56)
>
> at
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAX ArtifactProcessor.read(ExtensibleStAXArtifactProcessor.java: 136)
>
> at
> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:156)
>
> at
> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:56)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultURLArti factProcessorExtensionPoint$LazyURLArtifactProcessor.read(De faultURLArtifactProcessorExtensionPoint.java:222)
>
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:57)
>
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:55)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 55)
>
> ... 10 more
> Caused by: java.lang.ClassNotFoundException: org.apache.neethi.Policy
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at
> org.apache.tuscany.sca.extensibility.ClassLoaderServiceDisco verer$ServiceDeclarationImpl.loadClass(ClassLoaderServiceDis coverer.java:88)
>
> at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:376)
>
> ... 22 more
>
>
> and my version 2 app (cant find an SCADOmain.class in version 2 build -
> so did a google search and came up with somthing like this
> //demoV2SCA
> import org.apache.tuscany.sca.node.Client;
> import org.apache.tuscany.sca.node.Node;
> import org.apache.tuscany.sca.node.NodeFactory;
>
>
> public class demoV2Main {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
>
> //create new Tuscany node
> NodeFactory nf = NodeFactory.newInstance();
>
> //String root =
> ContributionLocationHelper.getContributionLocation("HelloWorld ");
> //Contribution contribution = new Contribution(root, root);
>
> Node node = nf.createNode();
>
> System.out.println("start tuscany node \n");
> node.start();
> HelloWorld hello =
> ((Client)node).getService(HelloWorld.class, "HelloWorld");
> // Calculate
> System.out.println("say " + hello.helloWorld());
> try
> {
> System.in.read();
> } catch (Exception e)
> {
> System.exit(0);
> }
> node.stop();
> }
>
>
> }
>
> which errors with
> Exception in thread "main" org.oasisopen.sca.ServiceRuntimeException: No
> SCA contributions are found on the classpath
> at
> org.apache.tuscany.sca.node.NodeFactory.createNode(NodeFacto ry.java:367)
> at demoV2Main.main(demoV2Main.java:25)
>
>
> so what am i doing wrong and how do i get a simple app up and running in
> eclipse
>
> Any help greatfully received - i have got stuck i think
>
--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #576081 is a reply to message #483436] |
Tue, 01 September 2009 15:55 |
Stephane Drapeau Messages: 199 Registered: July 2009 |
Senior Member |
|
|
Hi,
I think that it's a classpath problem.
> Caused by: java.lang.ClassNotFoundException: org.apache.neethi.Policy
Try to add neethi?.jar in your classpath. You can find it in tuscany/lib/
The best way to begin is to add all the libraries of Tuscany in your
classpath.
As Vincent said, you can also use the deployment tool [0]
Regards,
Stephane Drapeau
Obeo
[0]:
http://wiki.eclipse.org/STP/SCA_Component/SCA_Java_Run_and_D ebug_Tuscany
Vincent Zurczak a écrit :
> Hi William,
>
> For Tuscany 2.x, an exception would be normal, as it is not yet
> supported. I started to work on it but I could not find time to finish it.
>
> So, deploying an SCA application with SCA Tools can only be done with
> Tuscany 1.x for the moment.
>
> For Tuscany 1.5, and given the exception you got, it seems it is an
> error in your SCA application and not in the deployment tool. The
> deployment tool creates a client smilar to the one you wrote below
> (demoV1Main).
>
> What happens if you remove the sawsdl annotations from your composite?
> Does it solve the problem?
>
> About Tuscany 2, I think it is related to the OASIS namespace, which is
> not yet covered by the released SCA Tools. It is on the roadmap. You
> should replace the "sca" namespace in your composite by the OASIS one
> (it must be available in the samples running on Tuscany 2).
>
>
> Let me know if it helps.
>
>
> Vincent.
>
>
>
>
> William Woodman a écrit :
>> newbie here wonder if someone can help
>>
>> I have gallileo with stp 2.0.0.9 and 1.6.13 java vm
>>
>> i have downloaded v1.5 and v2 m3 tuscany binarys and installed on
>> harddrive.
>>
>> have created two user librarries in eclipse tuscnay v1 libs - pointed
>> at tuscany 1.5/lib/tuscany_sca_all.jar
>>
>> and tuscany v2 libs - pointed to tuscany v2m3/module/*.jar (cant find
>> a /lib directory in V2 at all - is that intentional??)
>>
>> created two user projects for "hello world" app quick test
>> used the sca editor to create demoSCA.composite as follows in both v1
>> and v2 apps
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
>> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
>> targetNamespace="http://eclipse.org/demoSCA/demoSCA">
>> <sca:component name="HelloWorldComponent">
>> <sca:implementation.java class="HelloWorldImpl"/>
>> <sca:service name="helloWorld">
>> <sca:interface.java interface="HelloWorld"/>
>> <sawsdl:semantic.sawsdl/>
>> </sca:service>
>> <sawsdl:semantic.sawsdl/>
>> </sca:component>
>> <sca:service name="helloWorld" promote="HelloWorldComponent/helloWorld">
>> <sca:interface.java interface="HelloWorld"/>
>> </sca:service>
>> </sca:composite>
>>
>> I have a simple interface (HelloWorld.java) marked as @Remotable (one
>> method)
>>
>> and a simple implementation marked with @Service (HelloWorld.class)
>> which just returns a String
>>
>> I have standalone client class to drive the simple project
>> import org.apache.tuscany.sca.host.embedded.SCADomain;
>>
>> //demoV1SCA.java
>> public class demoV1Main {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) {
>> // TODO Auto-generated method stub
>> //create new Tuscany node
>> System.out.println("starting new domain\n");
>>
>> // Locate the service using SCA APIs
>> SCADomain domain = SCADomain.newInstance("demoSCA");
>> System.out.println("lookup service\n");
>> HelloWorld hello = domain.getService(HelloWorld.class,
>> "HelloWorld");
>> // Calculate
>> System.out.println("say " + hello.helloWorld());
>> try
>> {
>> System.in.read();
>> } catch (Exception e)
>> {
>> System.exit(0);
>> }
>>
>> SCADomain.removeInstance(domain);
>> }
>>
>>
>> }
>>
>> when i run this as an applicaqtion it errors with
>> starting new domain
>>
>> 01-Sep-2009 14:05:49 org.apache.tuscany.sca.node.impl.NodeImpl <init>
>> INFO: Creating node: demoSCA
>> 01-Sep-2009 14:05:49
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntim eModuleActivator
>> start
>> WARNING: Class proxys not supported due to
>> NoClassDefFoundError:net/sf/cglib/proxy/Callback
>> 01-Sep-2009 14:05:49
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
>> WARNING: Exception starting module
>> org.apache.tuscany.sca.core.databinding.module.DataBindingMo duleActivator
>> :org/apache/axiom/om/OMElement
>> 01-Sep-2009 14:05:49
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
>> WARNING: Exception starting module
>> org.apache.tuscany.sca.http.jetty.module.JettyRuntimeModuleA ctivator
>> :javax/servlet/ServletException
>> 01-Sep-2009 14:05:50
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor
>>
>> SEVERE: IllegalStateException
>> Exception in thread "main" org.osoa.sca.ServiceRuntimeException:
>> org.apache.tuscany.sca.core.assembly.ActivationException:
>> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
>> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
>> org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)
>> at
>> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANo deFromClassLoader(NodeFactoryImpl.java:37)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.i nit(DefaultSCADomain.java:178)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init >(DefaultSCADomain.java:100)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInst ance(SCADomain.java:182)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(S CADomain.java:63)
>>
>> at demoV1Main.main(demoV1Main.java:22)
>> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException:
>> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
>> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
>> org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:305)
>>
>> at
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(R untimeBootStrapper.java:187)
>>
>> at
>> org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeIm pl.java:465)
>> at
>> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:193)
>> ... 6 more
>> Caused by:
>> org.apache.tuscany.sca.provider.SCADefinitionsProviderExcept ion:
>> java.lang.IllegalStateException: java.lang.ClassNotFoundException:
>> org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 61)
>>
>> at
>> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.loadSCA Definitions(RuntimeBootStrapper.java:278)
>>
>> ... 9 more
>> Caused by: java.lang.IllegalStateException:
>> java.lang.ClassNotFoundException: org.apache.neethi.Policy
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:378)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.addArtifactProcessor(DefaultStA XArtifactProcessorExtensionPoint.java:103)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.loadArtifactProcessors(DefaultS tAXArtifactProcessorExtensionPoint.java:191)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:125)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint.getProcessor(DefaultStAXArtifac tProcessorExtensionPoint.java:56)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.ExtensibleStAX ArtifactProcessor.read(ExtensibleStAXArtifactProcessor.java: 136)
>>
>> at
>> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:156)
>>
>> at
>> org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumen tProcessor.read(SCADefinitionsDocumentProcessor.java:56)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultURLArti factProcessorExtensionPoint$LazyURLArtifactProcessor.read(De faultURLArtifactProcessorExtensionPoint.java:222)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:57)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider$1.run(WSBindingDefinitionsProvider.java:55)
>>
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.WSBindingDefinitions Provider.getSCADefinition(WSBindingDefinitionsProvider.java: 55)
>>
>> ... 10 more
>> Caused by: java.lang.ClassNotFoundException: org.apache.neethi.Policy
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> at
>> org.apache.tuscany.sca.extensibility.ClassLoaderServiceDisco verer$ServiceDeclarationImpl.loadClass(ClassLoaderServiceDis coverer.java:88)
>>
>> at
>> org.apache.tuscany.sca.contribution.processor.DefaultStAXArt ifactProcessorExtensionPoint$LazyStAXArtifactProcessor.getMo delType(DefaultStAXArtifactProcessorExtensionPoint.java:376)
>>
>> ... 22 more
>>
>>
>> and my version 2 app (cant find an SCADOmain.class in version 2 build
>> - so did a google search and came up with somthing like this
>> //demoV2SCA
>> import org.apache.tuscany.sca.node.Client;
>> import org.apache.tuscany.sca.node.Node;
>> import org.apache.tuscany.sca.node.NodeFactory;
>>
>>
>> public class demoV2Main {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) {
>> // TODO Auto-generated method stub
>> //create new Tuscany node NodeFactory nf =
>> NodeFactory.newInstance();
>> //String root =
>> ContributionLocationHelper.getContributionLocation("HelloWorld ");
>> //Contribution contribution = new Contribution(root, root);
>>
>> Node node = nf.createNode();
>>
>> System.out.println("start tuscany node \n");
>> node.start();
>> HelloWorld hello =
>> ((Client)node).getService(HelloWorld.class, "HelloWorld");
>> // Calculate
>> System.out.println("say " + hello.helloWorld());
>> try
>> {
>> System.in.read();
>> } catch (Exception e)
>> {
>> System.exit(0);
>> }
>> node.stop();
>> }
>>
>>
>> }
>>
>> which errors with
>> Exception in thread "main" org.oasisopen.sca.ServiceRuntimeException:
>> No SCA contributions are found on the classpath
>> at
>> org.apache.tuscany.sca.node.NodeFactory.createNode(NodeFacto ry.java:367)
>> at demoV2Main.main(demoV2Main.java:25)
>>
>>
>> so what am i doing wrong and how do i get a simple app up and running
>> in eclipse
>>
>> Any help greatfully received - i have got stuck i think
>>
>
>
|
|
|
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #576175 is a reply to message #483677] |
Wed, 02 September 2009 17:58 |
|
Hi William,
In your client, you have written
> // Locate the service using SCA APIs
> SCADomain domain = SCADomain.newInstance("demoSCA");
Can you check what happens if you replace it by
> // Locate the service using SCA APIs
> SCADomain domain = SCADomain.newInstance("demoSCA.composite");
On the link Stéphane pointed to, the composite extension is provided in
the new instance argument. If the composite is in the "src" folder of
your project, the service should be found.
Vincent.
William Woodman a écrit :
>
>
> i've attached a picture of my eclipse project tree.
>
> Ive done two variants -
> one with the composite file in src/resources dir
> and one just top level with no substructure.
>
> eclipse wont let you add src/resources to class path as top level src is
> all ready in.
>
> either way i get this same error about the contribution
> starting new domain
>
> 02-Sep-2009 15:37:17 org.apache.tuscany.sca.node.impl.NodeImpl <init>
> INFO: Creating node: demoSCA.composite
> 02-Sep-2009 15:37:17 org.apache.tuscany.sca.node.impl.NodeImpl
> configureNode
> INFO: Loading contribution:
> file:/C:/documents%20and%20settings/802518659/workspace/demo V1SCA/bin/
> 02-Sep-2009 15:37:19 org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: demoSCA.composite
> lookup service
>
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException: The
> service HelloWorld has not been contributed to the domain
> at org.apache.tuscany.sca.node.impl.NodeImpl.getServiceReferenc
> e(NodeImpl.java:779)
> at org.apache.tuscany.sca.node.impl.NodeImpl.getService(NodeImp
> l.java:746)
> at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.g
> etService(DefaultSCADomain.java:227)
> at demoV1Main.main(demoV1Main.java:25)
>
> what exactly in SCA terms is a contribution ?
>
>
> here is my latest .composite file
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
> targetNamespace="http://eclipse.org/demoV1_1SCA/src/resources/demoSCA">
> <sca:component name="HelloWorldComponent">
> <sca:implementation.java class="HelloWorldImpl"/>
> <sca:service name="HelloWorld"/>
> </sca:component>
> <sca:service name="HelloWorld" promote="HelloWorldComponent/HelloWorld"/>
> </sca:composite>
>
> have i got this right now? thanks in advance
--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #576360 is a reply to message #576345] |
Fri, 04 September 2009 14:21 |
|
Hi William,
William Woodman a écrit :
> whats wierd is that the generated targetNamespace in the WSDL is the
> Reverse of my source path i.e. http://helloWorld.org.will
>
> is that what it should do ? i'd have expected it to come out like in
> the same order as the path. Is this just another ideosyncratic tuscany
> v1.5 ' feature' or as expected?
Yes, it is normal.
When mapping Java to XML (and vice-versa), Java package names are
written in the reversed order to generate the target namespace.
Vincent.
--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
|
|
|