简体   繁体   中英

org.apache.cxf.interceptor.Fault: Marshalling Error: null

I have created a webservice using cxf 3.4.1

When I send a request to the webservice it works fine but sometimes for one or other request it gives me error with the following stack trace on the console.

I am using jdk 1.6 , jboss 5.1.0 GA , jbossws-cxf-3.4.1.GA

Can anybody help me resolving this issue?

I receive the following error:

 org.apache.cxf.interceptor.Fault: Marshalling Error: null
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:252)
    at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
    at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.jav:110)

Nirmal is right. That's the typical error of CXF when the client closes the connection early. But there can be too many causes to get the specific answer just putting the exception message.

I had the same error, and in my case the reason was that I had declared an abstract class of exception in the WS, so when the client tried to unmarshall it, an exception was thrown and client had closed the connection early.

My advice is to put a breakpoint in the cause exception and debug the error.

Put the source code alongwith your questions for better responses.

This looks like the client has closed the connection for some reason. Either it timed out or the client ended or similar. Basically, the server is trying to write a response out, but the socket has been closed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM