user939878
user939878

Reputation: 21

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)

Upvotes: 2

Views: 10748

Answers (2)

Sergio Trapiello
Sergio Trapiello

Reputation: 758

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.

Upvotes: 1

Nirmal
Nirmal

Reputation: 4829

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.

Upvotes: 1

Related Questions