Hi,

Thank you very much for your help but unfortunatelly it does not work for
me.

I am very lost. If I use eclipse and I run the InformationServiceServer I
get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: commonj/work/Work
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at
org.apache.tuscany.sca.core.DefaultExtensionPointRegistry.getExtensionPoint(
DefaultExtensionPointRegistry.java:77)
        at
org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start(ReallySma
llRuntime.java:87)
        at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCA
Domain.java:101)
        at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.j
ava:230)
        at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69
)
        at
main.java.information.service.InformationServiceServer.main(InformationServi
ceServer.java:33)
Caused by: java.lang.ClassNotFoundException: commonj.work.Work
        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:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 8 more

Note: I am using tuscany 1.0.

On the other hand, if I compile using the pom file I get the error attached
in the out.txt document.

Could you please help me?

PS:I also followed the steps given in
http://tuscany.apache.org/build-your-first-web-services-with-tuscany.html
and the helloword worked for me but unfortunatelly I don't get my app
running.

Adriana. 

-----Mensaje original-----
De: Luciano Resende [mailto:[EMAIL PROTECTED] 
Enviado el: domingo, 06 de julio de 2008 3:19
Para: [email protected]
Asunto: Re: Module or composite file? / Using SCA components from non SCA
clients

Hey Adriana

   What version of Tuscany are you using ? trunk or a specific release ? I
can reproduce the issue you are having with the composite requiring promote
element on a service element.

   Well, I have put together a simple helloworld tuscany app using your
scenario/composite, and you can get the source code from my sandbox [1]. You
can run the app by running InformationServiceServer and then you can access
the wsdl following the binding.ws uri + ?wsdl [2]

   Please let me know if you have questions, or if it does not work for you.

[1]
https://svn.apache.org/repos/asf/tuscany/sandbox/lresende/sca/samples/hellow
orld-ws/
[2] http://localhost:8888/axis2/services/InformationService?wsdl

On Thu, Jul 3, 2008 at 11:40 PM, Adriana Verdejo <[EMAIL PROTECTED]>
wrote:
> Without the promote attribute I get the following warning message:
>
> cvc-complex-type.4: Attribute 'promote' must appear on element 
> 'sca:service'.
>
> And also the error message attached below.
>
>
> One question more, what should I use?...
>
> <sca:interface.java
> interface="eu.myproject.information.is.InformationService"/>
> Or
> <sca:interface.wsdl
> interface="http://informationservice#wsdl.interface(InformationService
> )"/>
>
> I used both of them and both without success.
>
> Regards,
>
> Adriana
>
> -----Mensaje original-----
> De: Luciano Resende [mailto:[EMAIL PROTECTED] Enviado el: jueves, 
> 03 de julio de 2008 16:35
> Para: [email protected]
> Asunto: Re: Module or composite file? / Using SCA components from non 
> SCA clients
>
> You should not have the promote attribute in your service.
>
> promote="InformationServiceComponent/InformationService"
>
> On Thu, Jul 3, 2008 at 2:25 AM, Adriana Verdejo 
> <[EMAIL PROTECTED]>
> wrote:
>> Hi,
>>
>> Thank you very much for the information.
>>
>> I have created my composite. This is the composite:
>>
>> <?xml version="1.0" encoding="ISO-8859-15"?> <sca:composite 
>> xmlns:sca="http://www.osoa.org/xmlns/sca/1.0";
>> name="InformationService"
>> targetNamespace="http://informationservice.myproject.eu";>
>>   <sca:component name="InformationServiceComponent">
>>     <sca:implementation.java
>> class="eu.myproject.information.is.impl.InformationServiceImpl"/>
>>     <sca:service name="InformationService"
>> promote="InformationServiceComponent/InformationService">
>>       <sca:interface.java
>> interface="eu.myproject.information.is.InformationService"/>
>>       <sca:binding.ws
>> uri="http://localhost:8888/axis2/services/InformationService"/>
>>     </sca:service>
>>   </sca:component>
>> </sca:composite>
>>
>> But I get this error message when I run the Server:
>>
>>
>> 03-jul-2008 10:47:43
>> org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
>> problem
>>
>> ADVERTENCIA: [WARNING] Duplicate service name:
>> InformationServiceComponent/InformationService null
>>
>> Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
>>
>> Exception in thread "main"
>>
>> org.osoa.sca.ServiceRuntimeException:
> org.osoa.sca.ServiceRuntimeException:
>> org.apache.tuscany.sca.core.assembly.ActivationException:
>> java.lang.NullPointerException
>>
>> at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(
>>
>> SCADomain.java:264)
>>
>> at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(
>>
>> SCADomain.java:69)
>>
>> at
>> eu.myproject.information.is.server.InformationServiceServer.main(Info
>> r
>> mationServiceServer.java:17)
>>
>> Caused by: org.osoa.sca.ServiceRuntimeException:
>> org.apache.tuscany.sca.core.assembly.ActivationException:
>> java.lang.NullPointerException
>>
>> at
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
>> a
>> ultSCADomain.java:180)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCAD
>> o
>> main.java:230)
>>
>> ... 2 more
>>
>> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException:
>> java.lang.NullPointerException
>>
>> at
>> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(
>> C
>> ompositeActivatorImpl.java:737)
>>
>> at
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Def
>> a
>> ultSCADomain.java:178)
>>
>> ... 3 more
>>
>> Caused by: java.lang.NullPointerException
>>
>> at
>> org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospect
>> o
>> rImpl.isWrapperStyle(WSDLOperationIntrospectorImpl.java:105)
>>
>> at
>> org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospect
>> o
>> rImpl.getWrapper(WSDLOperationIntrospectorImpl.java:113)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.Java2WSDLHelper.createWSDLInt
>> e
>> rfaceContract(Java2WSDLHelper.java:128)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.<
>> i
>> nit>(Axis2ServiceBindingProvider.java:50)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.c
>> r
>> eateServiceBindingProvider(Axis2BindingProviderFactory.java:57)
>>
>> at
>> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.c
>> r
>> eateServiceBindingProvider(Axis2BindingProviderFactory.java:40)
>>
>> at
>> org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$
>> L 
>> azyBindingProviderFactory.createServiceBindingProvider(DefaultProvide
>> r
>> FactoryExtensionPoint.java:194)
>>
>> at
>> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addServic
>> e
>> BindingProvider(CompositeActivatorImpl.java:397)
>>
>> at
>> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(
>> C
>> ompositeActivatorImpl.java:671)
>>
>> at
>> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(
>> C
>> ompositeActivatorImpl.java:729)
>>
>>
>> Do you know what is wrong? Thanks in advance,
>>
>> Adriana
>> ________________________________
>> De: Raymond Feng [mailto:[EMAIL PROTECTED] Enviado el: miƩrcoles,
>> 02 de julio de 2008 17:31
>> Para: [email protected]
>> Asunto: Re: Module or composite file? / Using SCA components from non 
>> SCA clients
>>
>> Hi,
>>
>> You need to write a composite file to declare the component. Please 
>> see an example at:
>>
>> https://svn.apache.org/repos/asf/tuscany/java/sca/samples/helloworld-
>> w
>> s-service
>>
>>
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>> targetNamespace="http://helloworld"; name="helloworldws">
>>
>> <component name="HelloWorldServiceComponent">
>>
>>     <implementation.java class="helloworld.HelloWorldImpl" />
>>
>>     <service name="HelloWorldService">
>>
>>         <binding.ws uri="http://localhost:8085/HelloWorldService"/>
>>
>>     </service>
>>
>> </component>
>>
>> </composite>
>>
>> In the sample above, we expose the HelloWorldServiceComponent as a 
>> web service.
>>
>> If you want to consume SCA services from outside the SCA domain, you 
>> probably need to access the services using the protocols used for the 
>> bindings. For example, use web services to access a SCA service 
>> configured with binding.ws.
>>
>> If the client code is in the same address space as the node, you can 
>> use org.apache.tuscany.sca.host.embedded.SCADomain.getService(cls,
>> serviceName) to get a proxy representing the service.
>> Thanks,
>> Raymond
>> From: Adriana Verdejo
>> Sent: Wednesday, July 02, 2008 1:19 AM
>> To: [email protected]
>> Subject: Module or composite file? / Using SCA components from non 
>> SCA clients Dear all
>>
>> I am new using Tuscany. I would like to provide a remotable service 
>> in the Java language and publish it to remote clients over SOAP. I 
>> have the code ready, with my interfaces and implementations and I 
>> would like to use SCA for providing the service.
>>
>> I have added the correspondent annotations (@Remotable in the 
>> interfaces and @Service in the implementations), I underdstand I have 
>> to also generate the .composite file but from different 
>> sources/samples I have seen I should generate a .module file or a
> .composite file. Which is right?
>> And where should it be located?
>>
>> How do I know all is right?
>>
>> Finally, how I should use my service from a non SCA client?
>>
>> Thanks in advance and best regards,
>>
>> Adriana
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
>



--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
[INFO] Scanning for projects...
Downloading: 
http://people.apache.org/repo/m2-incubating-repository/org/apache/tuscany/sca/tuscany-sca/1.4-SNAPSHOT/tuscany-sca-1.4-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:sample-helloworld-ws:jar:null

Reason: Cannot find parent: org.apache.tuscany.sca:tuscany-sca for project: 
null:sample-helloworld-ws:jar:null for project 
null:sample-helloworld-ws:jar:null


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: 
org.apache.tuscany.sca:tuscany-sca for project: 
null:sample-helloworld-ws:jar:null for project 
null:sample-helloworld-ws:jar:null
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find 
parent: org.apache.tuscany.sca:tuscany-sca for project: 
null:sample-helloworld-ws:jar:null for project 
null:sample-helloworld-ws:jar:null
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1370)
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:821)
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
        ... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 
'org.apache.tuscany.sca:tuscany-sca' not found in repository: Unable to 
download the artifact from any repository

  org.apache.tuscany.sca:tuscany-sca:pom:1.4-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  apache.incubator (http://people.apache.org/repo/m2-incubating-repository)
 for project org.apache.tuscany.sca:tuscany-sca
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:603)
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1366)
        ... 17 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable 
to download the artifact from any repository

  org.apache.tuscany.sca:tuscany-sca:pom:1.4-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  apache.incubator (http://people.apache.org/repo/m2-incubating-repository)

        at 
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:212)
        at 
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74)
        at 
org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:556)
        ... 18 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to 
download the artifact from any repository
        at 
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:331)
        at 
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:200)
        ... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Jul 07 08:59:55 CEST 2008
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------

Reply via email to