Hi,
I am having an issue related to the data size returned by the webservice
when the object (to be returned in response) size is small then webservice
successfully returns the soap response but if the object size is large then
it gives me the following error on console following a large stack trace.
Can anybody suggest me how to cope up with the issue of returning a heavy
object successfully with a fast pace to the webservice client.
I am using cxf 2.2.2.with default JAXB binding.
Error stack trace is :
Jul 14, 2009 12:33:07 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: null
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:159)
at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(Abst
ractOutDatabindingInterceptor.java:105)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutIntercept
or.java:68)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:236)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingCh
ainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:236)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationOb
server.java:89)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Jett
yHTTPDestination.java:302)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTP
Destination.java:265)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler
.java:70)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerColl
ection.java:230)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:
879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520
)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[org.mortbay.jetty.EofException]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:333)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:257)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl
.java:75)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:4
41)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:138)
... 21 more
Caused by: org.mortbay.jetty.EofException
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:787)
at
org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:568)
at
org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:946)
at
org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:648)
at
org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:579)
at
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStr
eam.java:46)
at
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStr
eam.java:55)
at
com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.write(UTF8XmlOutput.java:37
9)
at
com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.beginStartTag(UTF8XmlOutput
.java:157)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.leafElement(XMLSerializer.java:319
)
at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$1.writeLeafElement
(RuntimeBuiltinLeafInfoImpl.java:210)
at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$1.writeLeafElement
(RuntimeBuiltinLeafInfoImpl.java:209)
at
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAc
cessorImpl.writeLeafElement(TransducedAccessor.java:250)
at
com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody
(SingleElementLeafProperty.java:98)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImp
l.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:
681)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(
ArrayElementNodeProperty.java:65)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(
ArrayElementProperty.java:168)
at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERPr
operty.java:152)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImp
l.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:
681)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(
ArrayElementNodeProperty.java:65)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(
ArrayElementProperty.java:168)
at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERPr
operty.java:152)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImp
l.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:
681)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(
ArrayElementNodeProperty.java:65)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(
ArrayElementProperty.java:168)
at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERPr
operty.java:152)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImp
l.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:
681)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(
ArrayElementNodeProperty.java:65)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(
ArrayElementProperty.java:168)
at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERPr
operty.java:152)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImp
l.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:
681)
at
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody
(SingleElementNodeProperty.java:150)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImp
l.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:
681)
at
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody
(SingleElementNodeProperty.java:150)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanI
nfoImpl.java:156)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanI
nfoImpl.java:185)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInf
oImpl.java:305)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInf
oImpl.java:312)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInf
oImpl.java:71)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:490
)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328)
... 25 more
Caused by: java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
at sun.nio.ch.IOUtil.write(IOUtil.java:60)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at
org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:169)
at
org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:22
1)
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:721)
... 71 more
Jul 14, 2009 12:33:07 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
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.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1681)
at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:579)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInte
rceptor.handleMessage(SoapOutInterceptor.java:269)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInte
rceptor.handleMessage(SoapOutInterceptor.java:256)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:236)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(Abs
tractFaultChainInitiatorObserver.java:96)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:284)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingCh
ainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:236)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationOb
server.java:89)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Jett
yHTTPDestination.java:302)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTP
Destination.java:265)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler
.java:70)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerColl
ection.java:230)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:
879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520
)