I am running it as a webapp (with tomcat)

I have the messages below in tomcat log. I can see it has a problem with the
binding.ws... ( I bolded it)

How can I fix it?
I used the part in the composite with a java application using tuscany 1.4
and it worked OK.
I switched to yuscany 2.0 in the webapp, since I needed the web
implementation.
should I change something in the composite?


02/09/2009 16:59:52
org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl
addEndpointReference
INFO: EndpointRegistry: Add endpoint reference - Endpoint Reference:  URI =
foo#reference(service) Target = Endpoint:  URI =
WebClientComponent#service(WebClientImpl) [Unresolved]
02/09/2009 17:00:53
org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl
addEndpointReference
INFO: EndpointRegistry: Add endpoint reference - Endpoint Reference:  URI =
foo#reference(service) Target = Endpoint:  URI =
WebClientComponent#service(WebClientImpl) [Unresolved]
02/09/2009 17:00:54 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default
02/09/2009 17:00:54 org.apache.tuscany.sca.node.impl.NodeFactoryImpl
configureNode
INFO: Loading contribution:
file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/helloworld-jsp/WEB-INF/classes/
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
read
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [30,13])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [30,13])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
read
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [32,17])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [32,17])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
read
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [30,13])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [30,13])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
read
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [32,17])
02/09/2009 17:00:54
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
WARNING: Element {
http://docs.oasis-open.org/ns/opencsa/sca/200903}binding.ws cannot be
processed. ([row,col {unknown-source}]: [32,17])
02/09/2009 17:00:54
org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
WARNING: No targets for reference: Composite = {http://samples}Client
Reference = myService
02/09/2009 17:00:54
org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceEndpointReferenceBuilderImpl
WARNING: No targets for reference: Composite = {http://samples}Client
Reference = myService
02/09/2009 17:00:54
org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl addEndpoint
INFO: EndpointRegistry: Add endpoint - Endpoint:  URI =
MyClientComponent#service-binding(MyClient/MyClient)
02/09/2009 17:00:54
org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl addEndpoint
INFO: EndpointRegistry: Add endpoint - Endpoint:  URI =
MyClientComponent#service-binding(myService/myService)
02/09/2009 17:00:54
org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl
addEndpointReference
INFO: EndpointRegistry: Add endpoint reference - Endpoint Reference:  URI =
MyClientComponent#reference-binding($self$.MyClient/MyClient) Target =
Endpoint:  URI = MyClientComponent#service-binding(MyClient/MyClient)
02/09/2009 17:00:54 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at Client.MyClientImpl.aClientMethod(MyClientImpl.java:48)
at Client.MyClientImpl.run(MyClientImpl.java:67)
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.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:136)
at
org.apache.tuscany.sca.binding.sca.provider.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
at
org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:302)
at
org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:167)
at $Proxy10.run(Unknown Source)
at Client.WebClientImpl.sayHello(WebClientImpl.java:30)
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.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:136)
at
org.apache.tuscany.sca.binding.sca.provider.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
at
org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:302)
at
org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:167)
at $Proxy9.sayHello(Unknown Source)
at org.apache.jsp.hello_jsp._jspService(hello_jsp.java:108)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:80)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
aClientMethod on thread Thread[http-8080-1,5,main]



2009/9/2 ant elder <[email protected]>

> On Tue, Sep 1, 2009 at 1:41 PM, Renana Heller<[email protected]> wrote:
> > hello,
> > I have a java program with a WS service interface and I want to write a
> web
> > application which connects to it.
> > I created a jsp file which creates reference to a Client Component (using
> > implementation.web), and I have in the ClientImpl class a reference to an
> > interface implemented by WS (binding.ws)
> > but when I execute the jsp file, when the client tries to call a method
> from
> > the interface I get null pointer exception.
> > The composite I have is:
> >
> >     <component name="foo">
> >
> >         <implementation.web web-uri=""/>
> >
> >         <reference name="service" target="MyClientComponent"/>
> >
> >     </component>
> >
> >     <component name="MyClientComponent">
> >
> >         <implementation.java class="Client.MyClientImpl" />
> >
> >         <reference name="myService">
> >
> >             <interface.java interface="Client.MyService"
> >
> >                     callbackInterface="Client.MyServiceCallback" />
> >
> >             <binding.ws uri="http://localhost:8082/BigMediMash"; />
> >
> >             <callback>
> >
> >                 <binding.ws uri="http://localhost:8083/MashCallback"/>
> >
> >             </callback>
> >
> >         </reference>
> >
> >     </component>
> >
> >
> >
> > I get null when I call myService.method() from MyClientImpl.
> >
> >
> >
> > I tried seperating the composite to two composites.
> > first one for the jsp and the Client Class (without the reference), and
> then
> > call another composite using the following code:
> >
> > Node node = NodeFactory.newInstance().createNode("client.composite",
> > MyClientImpl.class.getClassLoader());
> > node.start();
> > MyClient myClient = ((Client)node).getService(MyClient.class,
> > "MyClientComponent");
> >
> > But I get the same error (null pointerexception)
> > How Can I inject MyService interface to the code?
> > Thanks,
> > Renana.
> >
>
> I wonder if its some dependencies missing, could you show a the
> console log of the startup to see if there are any warning messages?
> How are you running the composite - from a webapp or using the
> standalone runtime from the Tuscany binary distribution?
>
>  ...ant
>


-- 
Best,
Renana.

Reply via email to