当前位置: 代码迷 >> J2EE >> 用axis2 和 hibernate 开Webservice出现 org.apache.axis2.AxisFault解决方法
  详细解决方案

用axis2 和 hibernate 开Webservice出现 org.apache.axis2.AxisFault解决方法

热度:225   发布时间:2016-04-22 02:34:52.0
用axis2 和 hibernate 开Webservice出现 org.apache.axis2.AxisFault
Axis2 version is 1.5.5
java.version 1.6.0_13  

直接用网址调用webservice服务的接口是正确的,能返回数据。但如果按F5一直刷新浏览器

就会出现错误,这样测试是为了检查如果多个人同时请求服务时,是否能处理得来。

错误信息如下:

[ERROR] 
org.apache.axis2.AxisFault
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:146)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:358)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:235)
at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:521)
at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:432)
at org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:395)
at org.apache.axis2.transport.http.AxisServlet.access$200(AxisServlet.java:88)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processFault(AxisServlet.java:845)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:830)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:271)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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)
Caused by: com.ctc.wstx.exc.WstxIOException: null
at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1692)
at com.ctc.wstx.sw.BaseStreamWriter.close(BaseStreamWriter.java:288)
at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.close(XMLStreamWriterWrapper.java:46)
at org.apache.axiom.om.impl.MTOMXMLStreamWriter.close(MTOMXMLStreamWriter.java:188)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:197)
at org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143)
... 23 more
Caused by: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:387)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1690)
... 28 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
  相关解决方案