日期:2014-05-19  浏览次数:20842 次

关于xfire+spring开发webservice的一个错误!
大家好,我用xfire+spring开发webservice服务时,当前台调用webservice时报下面的错误,大家帮我看一下,搞了半天了也没搞定,郁闷啊。。
Java code

  信息: Loading WebApplicationContext for Spring FrameworkServlet 'xfire'
10-03-29@09:40:20 ERROR (pushlet) - Couldn't invoke servlet request.
java.lang.IllegalStateException: Can't overwrite cause
    at java.lang.Throwable.initCause(Throwable.java:320)
    at com.ctc.wstx.compat.Jdk14Impl.setInitCause(Jdk14Impl.java:70)
    at com.ctc.wstx.exc.WstxException.<init>(WstxException.java:46)
    at com.ctc.wstx.exc.WstxIOException.<init>(WstxIOException.java:16)
    at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:536)
    at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:592)
    at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:617)
    at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:312)
    at org.codehaus.xfire.util.STAXUtils.createXMLStreamReader(STAXUtils.java:762)
    at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:297)
    at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
    at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:67)
    at org.codehaus.xfire.spring.remoting.XFireExporter.handleRequest(XFireExporter.java:48)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    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.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:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)




web.xml中servlet的配置
XML code

   <servlet>   
     <servlet-name>xfire</servlet-name>   
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>   
 </servlet> 
 <servlet-mapping>
     <servlet-name>xfire</servlet-name>
     <url-pattern>/service/moa/*</url-pattern>
 </servlet-mapping>