org.apache.cxf.interceptor.Fault:编组错误:null
我使用 cxf 3.4.1 创建了一个 Web 服务,
当我向 Web 服务发送请求时,它工作正常,但有时只需要一个 或其他请求,它给我错误,并显示以下堆栈跟踪 安慰。
我正在使用 jdk 1.6 、 jboss 5.1.0 GA 、 jbossws-cxf-3.4.1.GA
有人可以帮我解决这个问题吗?
我收到以下错误:
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)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将源代码与您的问题放在一起以获得更好的答复。
这看起来客户端由于某种原因关闭了连接。要么超时,要么客户端结束或类似的情况。基本上,服务器正在尝试写出响应,但套接字已关闭。
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.
尼尔马尔是对的。这是当客户端提前关闭连接时 CXF 的典型错误。
但可能有太多原因,仅通过输入异常消息就无法得到具体答案。
我遇到了同样的错误,在我的例子中,原因是我在 WS 中声明了一个异常的抽象类,因此当客户端尝试解组它时,会抛出异常并且客户端提前关闭了连接。
我的建议是在原因异常中放置一个断点并调试错误。
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.