Tuscany SCA 1.0 was released around Septembre 2007, and unless you
have any requirements to use that release, I'd recommend migrating to
the current release : Java SCA 1.2.

As for trying to help you, maybe you could checkout the sample on my
sandbox and provide a patch that model it as your scenario ? This way
I could see the same error and debug locally ?

Thanks.

On Mon, Jul 7, 2008 at 2:18 AM, Adriana Verdejo
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Fortunatelly now it works but I have tried make the same for my app and I
> have several problems.
>
> My interface service extends other two interfaces...
>
> package information.service;
> import org.osoa.sca.annotations.Remotable;
> @Remotable
> public interface InformationService extends Information, Catalogue{
> }
>
> How should I manage that? With the same composite you provided me I get this
> error message:
>
> 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.j
> ava:264)
>        at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69
> )
>        at
> information.service.InformationServiceServer.main(InformationServiceServer.j
> ava:33)
> 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>(DefaultSCA
> Domain.java:180)
>        at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.j
> ava:230)
>        ... 2 more
> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException:
> java.lang.NullPointerException
>        at
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(Composi
> teActivatorImpl.java:737)
>        at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCA
> Domain.java:178)
>        ... 3 more
> Caused by: java.lang.NullPointerException
>        at
> org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.
> isWrapperStyle(WSDLOperationIntrospectorImpl.java:105)
>        at
> org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.
> getWrapper(WSDLOperationIntrospectorImpl.java:113)
>        at
> org.apache.tuscany.sca.binding.ws.axis2.Java2WSDLHelper.createWSDLInterfaceC
> ontract(Java2WSDLHelper.java:128)
>        at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.<init>(A
> xis2ServiceBindingProvider.java:50)
>        at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createSe
> rviceBindingProvider(Axis2BindingProviderFactory.java:57)
>        at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createSe
> rviceBindingProvider(Axis2BindingProviderFactory.java:40)
>        at
> org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBin
> dingProviderFactory.createServiceBindingProvider(DefaultProviderFactoryExten
> sionPoint.java:194)
>        at
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addServiceBindin
> gProvider(CompositeActivatorImpl.java:397)
>        at
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(Composi
> teActivatorImpl.java:671)
>        at
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(Composi
> teActivatorImpl.java:729)
>        ... 4 more
>
>
> Thanks in advance and best regards,
>
> Adriana.
>
> -----Mensaje original-----
> De: Adriana Verdejo [mailto:[EMAIL PROTECTED]
> Enviado el: lunes, 07 de julio de 2008 9:10
> Para: [email protected]
> Asunto: RE: Module or composite file? / Using SCA components from non SCA
> clients
>
> 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/
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Reply via email to