Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Service Component Architecture (SCA) Tools » Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #9076] Mon, 20 July 2009 09:35 Go to next message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

Hi.

Luciano Resende a écrit :
> On Sat, Jul 18, 2009 at 3:00 AM, Nishant
> Chandra<nishant.chandra@gmail.com> wrote:
>
>> Hi,
>> I started using Tuscany 2.0 M2 release along with eclipse plugin. I see this
>> error while running the "Restaurant" example from eclipse (SCA Tools
>> v2.0.0):
>> Deploying contentmoderation.composite...
>> java.lang.ClassNotFoundException:
>> org.apache.tuscany.sca.host.embedded.SCADomain
>> at java.net.URLClassLoader$1.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>> at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Unknown Source)
>> at
>> org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(Tusc anyMain1x.java:32

Indeed, SCA Tools do not yet support Tuscany 2.x.
I can take a moment (probably tomorrow) to integrate this support.
As we do not plan an intermediate release for the moment, and if you are
interested, I can then explain you how to proceed to use this update
without reinstalling SCA Tools.

Regards,

Vincent Zurczak.

--
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 91 72
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #483393 is a reply to message #9076] Tue, 01 September 2009 12:56 Go to previous messageGo to next message
William Woodman is currently offline William WoodmanFriend
Messages: 28
Registered: July 2009
Junior Member
Help

cant get tuscany and gallileo STP to work for tuscany 1.5 or tuscany v2
M3, and 1.6.13 java vm

forgive me guys - newbie here

I've downloaded gallileo, and enabled the STP tools etc version 2.0.0.2009

ive downloaded tuscany 1.5 and version 2M3 and installed on my C drive.

i've created two projects in eclipse one for version 1.5 libraries and
another for version 2 libraries.

wanted to do something real simple start so i created two user libraries
in eclipse
tuscany v1 libs - pointed at tuscany 1.5\lib\tuscany_sca_all.jar

and

tuscany v2 libs - pointed at tuscany v2m3/modules/*.jar (cant find a /libs
directory at all - is that expected??)


created two proejcts for "hello world" newbie build.

essentially I have a java interface (mared @Remotable) and a java
implementation class marked with @Service (HelloWorld.class)

I then create the composite in the diagram editor as follows


<?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 then build a standalone client to service

my version 1 client looks like this

//demoV1SCA.java
import org.apache.tuscany.sca.host.embedded.SCADomain;

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);
}


}

This errors with the following if i try and run the class in eclipse

as follows

tarting new domain

01-Sep-2009 13:51:27 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: demoSCA
01-Sep-2009 13:51:27
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 13:51:27 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 13:51:27 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 13:51:27
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.sca.SCABindingDefinitionsProv ider.getSCADefinition(SCABindingDefinitionsProvider.java:68)
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.sca.SCABindingDefinitionsProv ider$2.run(SCABindingDefinitionsProvider.java:64)
at
org.apache.tuscany.sca.binding.sca.SCABindingDefinitionsProv ider$2.run(SCABindingDefinitionsProvider.java:62)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.tuscany.sca.binding.sca.SCABindingDefinitionsProv ider.getSCADefinition(SCABindingDefinitionsProvider.java:62)
... 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



however under version two i cant find an SCADomain class at all . looked
and google and came up with this.


//demoV2SCA.java
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)



Can anyone please help to get a basic version in 1.5 or v2 up and running
What am i doing wrong ?!!
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #491818 is a reply to message #9076] Fri, 16 October 2009 00:16 Go to previous messageGo to next message
Amit Piplani is currently offline Amit PiplaniFriend
Messages: 2
Registered: October 2009
Junior Member
Hi,

Can you let me know how did you resolve ClassNotFoundException

Deploying Restaurant.composite...
java.lang.ClassNotFoundException: org.apache.tuscany.sca.host.embedded.SCADomain
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(Tusc anyMain1x.java:32)
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #492530 is a reply to message #491818] Tue, 20 October 2009 16:06 Go to previous message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

Hi Amit,

This error may occur in two cases:

+ You are using Tuscany 1.x but you did not specify the runtime
librairies location in the SCA preference page. To solve it, go in your
preference page and create / update the Tuscany configuration.

+ You are using Tuscany 2.x.
This case has not yet been fixed.
I have everything I need to fix it, except time. :(
Besides, with the Tuscany 2.x, all the librairies are not in the same
directory, and it is really painful to use the current deployment mechanism.

I have to adapt the way we reference runtime location, and this is what
takes most of the time. Anyway, this is expected for December, as
desxcribed on our roadmap [0]. But I think it will be solved before.

Just be patient. ;)
The best solution, waiting for this, is to create your own launcher for
Tuscany 2.x. A sample is available here [0].


Regards,

Vincent.



[0]: http://wiki.eclipse.org/STP/SCA_Component
[1]:
http://svn.apache.org/repos/asf/tuscany/java/sca/samples/bin ding-ws-calculator/src/main/java/sample/SampleClientImpl.jav a



Amit Piplani a écrit :
> Hi,
>
> Can you let me know how did you resolve ClassNotFoundException
>
> Deploying Restaurant.composite...
> java.lang.ClassNotFoundException:
> org.apache.tuscany.sca.host.embedded.SCADomain
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(Tusc
> anyMain1x.java:32)


--
Vincent Zurczak
EBM WebSourcing
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #576009 is a reply to message #9076] Tue, 01 September 2009 12:56 Go to previous message
William Woodman is currently offline William WoodmanFriend
Messages: 28
Registered: July 2009
Junior Member
Help

cant get tuscany and gallileo STP to work for tuscany 1.5 or tuscany v2
M3, and 1.6.13 java vm

forgive me guys - newbie here

I've downloaded gallileo, and enabled the STP tools etc version 2.0.0.2009

ive downloaded tuscany 1.5 and version 2M3 and installed on my C drive.

i've created two projects in eclipse one for version 1.5 libraries and
another for version 2 libraries.

wanted to do something real simple start so i created two user libraries
in eclipse
tuscany v1 libs - pointed at tuscany 1.5\lib\tuscany_sca_all.jar

and

tuscany v2 libs - pointed at tuscany v2m3/modules/*.jar (cant find a /libs
directory at all - is that expected??)


created two proejcts for "hello world" newbie build.

essentially I have a java interface (mared @Remotable) and a java
implementation class marked with @Service (HelloWorld.class)

I then create the composite in the diagram editor as follows


<?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 then build a standalone client to service

my version 1 client looks like this

//demoV1SCA.java
import org.apache.tuscany.sca.host.embedded.SCADomain;

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);
}


}

This errors with the following if i try and run the class in eclipse

as follows

tarting new domain

01-Sep-2009 13:51:27 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: demoSCA
01-Sep-2009 13:51:27
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 13:51:27 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 13:51:27 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 13:51:27
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.sca.SCABindingDefinitionsProv ider.getSCADefinition(SCABindingDefinitionsProvider.java:68)
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.sca.SCABindingDefinitionsProv ider$2.run(SCABindingDefinitionsProvider.java:64)
at
org.apache.tuscany.sca.binding.sca.SCABindingDefinitionsProv ider$2.run(SCABindingDefinitionsProvider.java:62)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.tuscany.sca.binding.sca.SCABindingDefinitionsProv ider.getSCADefinition(SCABindingDefinitionsProvider.java:62)
... 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



however under version two i cant find an SCADomain class at all . looked
and google and came up with this.


//demoV2SCA.java
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)



Can anyone please help to get a basic version in 1.5 or v2 up and running
What am i doing wrong ?!!
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #576379 is a reply to message #9076] Fri, 16 October 2009 00:16 Go to previous message
Amit Piplani is currently offline Amit PiplaniFriend
Messages: 2
Registered: October 2009
Junior Member
Hi,

Can you let me know how did you resolve ClassNotFoundException

Deploying Restaurant.composite...
java.lang.ClassNotFoundException: org.apache.tuscany.sca.host.embedded.SCADomain
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(Tusc anyMain1x.java:32)
Re: Running Tuscany 2.0 M2 examples in with/without Eclipse, was Re: WELCOME to user@tuscany.apache [message #576388 is a reply to message #576379] Tue, 20 October 2009 16:06 Go to previous message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

Hi Amit,

This error may occur in two cases:

+ You are using Tuscany 1.x but you did not specify the runtime
librairies location in the SCA preference page. To solve it, go in your
preference page and create / update the Tuscany configuration.

+ You are using Tuscany 2.x.
This case has not yet been fixed.
I have everything I need to fix it, except time. :(
Besides, with the Tuscany 2.x, all the librairies are not in the same
directory, and it is really painful to use the current deployment mechanism.

I have to adapt the way we reference runtime location, and this is what
takes most of the time. Anyway, this is expected for December, as
desxcribed on our roadmap [0]. But I think it will be solved before.

Just be patient. ;)
The best solution, waiting for this, is to create your own launcher for
Tuscany 2.x. A sample is available here [0].


Regards,

Vincent.



[0]: http://wiki.eclipse.org/STP/SCA_Component
[1]:
http://svn.apache.org/repos/asf/tuscany/java/sca/samples/bin ding-ws-calculator/src/main/java/sample/SampleClientImpl.jav a



Amit Piplani a écrit :
> Hi,
>
> Can you let me know how did you resolve ClassNotFoundException
>
> Deploying Restaurant.composite...
> java.lang.ClassNotFoundException:
> org.apache.tuscany.sca.host.embedded.SCADomain
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(Tusc
> anyMain1x.java:32)


--
Vincent Zurczak
EBM WebSourcing
Previous Topic:A video of SCA Tools
Next Topic:Scope of a SCA assembly
Goto Forum:
  


Current Time: Mon Sep 24 06:32:45 GMT 2018

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

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

Back to the top