Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Service Component Architecture (SCA) Tools » help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working
help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working [message #576036] Tue, 01 September 2009 13:11
William Woodman is currently offline William WoodmanFriend
Messages: 28
Registered: July 2009
Junior Member
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
Previous Topic:Re: [stp-dev] STP-SCA Tools not drawing wire lines when reference target uses component URI instead
Next Topic:help:cant get gallileo eclipse STP tuscany v1 or v2 m3 working
Goto Forum:
  


Current Time: Fri Nov 16 15:35:17 GMT 2018

Powered by FUDForum. Page generated in 0.01729 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top