You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Emily Gu <e2...@gmail.com> on 2007/10/01 08:23:25 UTC

Re: How to - Write a service with Spring - didn't work in Tomcat

Thanks Jeff. I'll give another try tomorrow and let you know whether it
worked. I just downloaded the latest version of cxf.

On 9/30/07, Jeff.Yu <je...@iona.com> wrote:
>
> Hi
>
> Not sure which cxf version are you using, but it seems cxf-2.0.2... Are
> you testing it using java_first_spring_support sample?
> If you use it, it should be deployed successfully to Tomcat by the
> Sample's README file.
>
> If you deploy the war to tomcat, and then you want to run client by using
> "ant client", you need to change the demo/spring/client/client-beans.xmlas follow.
> Because deploy it to tomcat, the address is changed.
>
> Change the address property to
>
> <property name="address" value="
> http://localhost:8080/spring_http/HelloWorld"/>
>
>
> HTH...
>
> Thanks
> Jeff
>
>
> Emily Gu wrote:
> > Thanks Willem for your quick reply.
> >
> > I used the exact the same code in sample/java_first_spring_support. It
> > worked on the command line with Jetty server but not with Tomcat.
> >
> > I searched the link you gave and no success yet. Any help is greatly
> > appreciated.
> >
> > BTW, the sample/rest_http_binding client is not working as well. after
> > running "ant server", those restful URL, such as "
> >
> > http://localhost:8080/xml/customers is working but not when you manually
> run
> > the ClientMain.java. Did I miss anything?
> >
> > Thanks!
> >
> >
> >
> > On 9/29/07, Willem2 <ni...@iona.com> wrote:
> >
> >> You can find some discusses from www.nabble.com cxf forum[1].
> >> [1]
> >>
> >>
> http://www.nabble.com/forum/Search.jtp?query=saaj&local=y&forum=16914&matchingForums=a
> >>
> >> Here[2] is a direct answer for you .
> >> [2]http://www.nabble.com/Cxf-
> >>
> spring-client-throws-Cannot-create-SAAJ-factory-instance-tf4055658.html#a11521672
> >>
> >> Willem.
> >>
> >>
> >> Emily Gu wrote:
> >>
> >>> Hi,
> >>>
> >>> I am getting following error when run this in tomcat. Please help!
> >>>
> >>>
> >>> NFO: Interceptor has thrown exception, unwinding now
> >>>
> >>> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> >>>
> >>> at
> >>>
> >>>
> >>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> >>
> >>> (*ReadHeadersInterceptor.java:187*)
> >>>
> >>> at
> >>>
> >>>
> >>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> >>
> >>> (*ReadHeadersInterceptor.java:56*)
> >>>
> >>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
> >>> PhaseInterceptorChain.java:207*)
> >>>
> >>> at org.apache.cxf.endpoint.ClientImpl.onMessage(*ClientImpl.java:395*)
> >>>
> >>> at
> >>>
> >>>
> >>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
> >>
> >>> (*HTTPConduit.java:1932*)
> >>>
> >>> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close
> (*
> >>> HTTPConduit.java:1790*)
> >>>
> >>> at
> >>> org.apache.cxf.transport.AbstractConduit.close(*AbstractConduit.java
> >>>
> >> :66*)
> >>
> >>> at org.apache.cxf.transport.http.HTTPConduit.close(*HTTPConduit.java
> >>>
> >> :576*)
> >>
> >>> at
> >>>
> >>>
> >>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage
> >>
> >>> (*MessageSenderInterceptor.java:62*)
> >>>
> >>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
> >>> PhaseInterceptorChain.java:207*)
> >>>
> >>> at org.apache.cxf.endpoint.ClientImpl.invoke(*ClientImpl.java:254*)
> >>>
> >>> at org.apache.cxf.endpoint.ClientImpl.invoke(*ClientImpl.java:205*)
> >>>
> >>> at org.apache.cxf.frontend.ClientProxy.invokeSync(*ClientProxy.java
> :73*)
> >>>
> >>> at
> >>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(*JaxWsClientProxy.java
> >>>
> >> :135*)
> >>
> >>> at $Proxy11.sayHi(Unknown Source)
> >>>
> >>> at demo.spring.client.Client.main(*Client.java:20*)
> >>>
> >>> Caused by: *com.ctc.wstx.exc.WstxEOFException*: Unexpected EOF in
> prolog
> >>>
> >>> at [row,col {unknown-source}]: [1,0]
> >>>
> >>> at
> >>> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(*StreamScanner.java
> >>>
> >> :661*
> >>
> >>> )
> >>>
> >>> at
> >>> com.ctc.wstx.sr.BasicStreamReader.handleEOF(*BasicStreamReader.java
> >>>
> >> :2134*
> >>
> >>> )
> >>>
> >>> at
> >>> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(*
> BasicStreamReader.java
> >>> :2040*)
> >>>
> >>> at com.ctc.wstx.sr.BasicStreamReader.next(*BasicStreamReader.java
> :1069*)
> >>>
> >>> at
> >>> com.ctc.wstx.sr.BasicStreamReader.nextTag(*BasicStreamReader.java
> :1095*)
> >>>
> >>> at
> >>>
> >>>
> >>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> >>
> >>> (*ReadHeadersInterceptor.java:85*)
> >>>
> >>> ... 15 more
> >>>
> >>> Exception in thread "main" *javax.xml.ws.WebServiceException*: Cannot
> >>> create
> >>> SAAJ factory instance.
> >>>
> >>> at org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(*
> >>> SOAPBindingImpl.java:118*)
> >>>
> >>> at
> >>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(*JaxWsClientProxy.java
> >>>
> >> :151*)
> >>
> >>> at $Proxy11.sayHi(Unknown Source)
> >>>
> >>> at demo.spring.client.Client.main(*Client.java:20*)
> >>>
> >>>
> >>>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to---Write-a-service-with-Spring---didn%27t-work-in-Tomcat-tf4541046.html#a12961770
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >>
> >
> >
>