升级到 2.2.10 后,CXF Web 服务将无法工作
将 OpenEJB 从 3.1.2(使用 CXF 2.0.9)升级到 OpenEJB 3.1.3(使用 CXF 2.2.10)后,基于 CXF 的 Web 服务在服务器端出现以下异常:
org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://xxxxxx.com/wsdl}ProInfoMgmtWebService has thrown exception, unwinding now
java.lang.NullPointerException
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:961)
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:949)
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:183)
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:71)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
at org.apache.openejb.server.cxf.HttpDestination.invoke(HttpDestination.java:123)
at org.apache.openejb.server.cxf.CxfWsContainer.processPOST(CxfWsContainer.java:106)
at org.apache.openejb.server.cxf.CxfWsContainer.onMessage(CxfWsContainer.java:77)
at org.apache.openejb.server.webservices.OpenEJBHttpWsRegistry$ClassLoaderHttpListener.onMessage(OpenEJBHttpWsRegistry.java:117)
at org.apache.openejb.server.httpd.HttpListenerRegistry.onMessage(HttpListenerRegistry.java:43)
at org.apache.openejb.server.httpd.OpenEJBHttpServer.process(OpenEJBHttpServer.java:176)
at org.apache.openejb.server.httpd.OpenEJBHttpServer.processRequest(OpenEJBHttpServer.java:132)
at org.apache.openejb.server.httpd.OpenEJBHttpServer.service(OpenEJBHttpServer.java:78)
at org.apache.openejb.server.httpd.HttpEjbServer.service(HttpEjbServer.java:61)
at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91)
at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
看来这不是 OpenEJB 问题但仅限 CXF。 CXF 2.0.9 和 2.2.10 之间发生了什么变化导致此错误?
After upgrading OpenEJB from 3.1.2 (uses CXF 2.0.9) to OpenEJB 3.1.3 (uses CXF 2.2.10) CXF-based web-services are broken with the following exception on a server side:
org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://xxxxxx.com/wsdl}ProInfoMgmtWebService has thrown exception, unwinding now
java.lang.NullPointerException
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:961)
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:949)
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:183)
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:71)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
at org.apache.openejb.server.cxf.HttpDestination.invoke(HttpDestination.java:123)
at org.apache.openejb.server.cxf.CxfWsContainer.processPOST(CxfWsContainer.java:106)
at org.apache.openejb.server.cxf.CxfWsContainer.onMessage(CxfWsContainer.java:77)
at org.apache.openejb.server.webservices.OpenEJBHttpWsRegistry$ClassLoaderHttpListener.onMessage(OpenEJBHttpWsRegistry.java:117)
at org.apache.openejb.server.httpd.HttpListenerRegistry.onMessage(HttpListenerRegistry.java:43)
at org.apache.openejb.server.httpd.OpenEJBHttpServer.process(OpenEJBHttpServer.java:176)
at org.apache.openejb.server.httpd.OpenEJBHttpServer.processRequest(OpenEJBHttpServer.java:132)
at org.apache.openejb.server.httpd.OpenEJBHttpServer.service(OpenEJBHttpServer.java:78)
at org.apache.openejb.server.httpd.HttpEjbServer.service(HttpEjbServer.java:61)
at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91)
at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
It seems that it's not OpenEJB problem but CXF-only. What could have changed between CXF 2.0.9 and 2.2.10 to cause this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有相关的错误 CXF-3170“StaxUtils.java:961 中的 NullPointerException”从12月6日开始。这似乎是完全相同的问题,作者知道原因:
您可能需要直接询问 CXF bug 的作者或者等待 CXF 的下一个版本修复此 bug,并要求 OpenEJB 开发人员升级 CXF。
There is the related bug CXF-3170 "NullPointerException in StaxUtils.java:961" from Dec 6th. It seems to be exactly the same problem and the author know the reason:
You are probably need to ask directly the author of the CXF bug OR wait for the next release of CXF where this bug will be fixed and ask OpenEJB developers to upgrade CXF.