Web服务异常,同时将值返回给客户端?

时间:2012-05-10 11:33:24

标签: java web-services exception tomcat

May 10, 2012 4:53:31 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate doPost
SEVERE: caught throwable
javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[ClientAbortException:  java.io.IOException]
    at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:303)
    at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:128)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:94)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:251)
    at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:251)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:74)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:385)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
    at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:159)
    at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:49)
    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:127)
    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:298)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1600)
    at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[ClientAbortException:  java.io.IOException]
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:257)
    at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
    at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:105)
    at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:296)
    ... 24 more
Caused by: ClientAbortException:  java.io.IOException
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
    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.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.write(UTF8XmlOutput.java:344)
    at com.sun.xml.bind.v2.runtime.output.Encoded.write(Encoded.java:127)
    at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.doText(UTF8XmlOutput.java:256)
    at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:244)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.text(XMLSerializer.java:384)
    at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$1.writeText(RuntimeBuiltinLeafInfoImpl.java:168)
    at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$1.writeText(RuntimeBuiltinLeafInfoImpl.java:171)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementLeafProperty.serializeItem(ArrayElementLeafProperty.java:46)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
    at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:116)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:663)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:250)
    ... 27 more
Caused by: java.io.IOException
    at org.apache.coyote.http11.InternalAprOutputBuffer.flushBuffer(InternalAprOutputBuffer.java:716)
    at org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(InternalAprOutputBuffer.java:746)
    at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
    at org.apache.coyote.http11.InternalAprOutputBuffer.doWrite(InternalAprOutputBuffer.java:552)
    at org.apache.coyote.Response.doWrite(Response.java:560)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
    ... 44 more

它可能是什么原因?

和m使用apache tomcat。

1 个答案:

答案 0 :(得分:1)

Caused by: ClientAbortException: java.io.IOException客户端已断开连接。