应用程序类'com.sun.xml.messaging.saaj.soap.SOAPPartImpl。:119'

时间:2016-07-11 08:36:35

标签: java soap ibm-cloud

我正在尝试通过Bluemix部署Java应用程序。当我在本地Liberty Server(Liberty 16.0.0.2)上部署它时,它运行正常,我可以从SOAP客户端点击该网址。

但是当我在Bluemix上尝试它时,它给了我这个错误:

  

应用程序类抛出的异常   'com.sun.xml.messaging.saaj.soap.SOAPPartImpl.:119'   java.lang.VerifyError:JVMVRFY012堆栈形状不一致;   类= COM /阳光/ XML /消息/ SAAJ / SOAP / SOAPDocumentImpl,   method = createDocumentFragment()Lorg / w3c / dom / DocumentFragment;,pc = 5;   在签名中键入Mismatch,参数0   COM /太阳/ XML /消息/ SAAJ /肥皂/ SOAPDocumentFragment :( LCOM /太阳/组织/阿帕奇/的xerces /内部/ DOM / CoreDocumentImpl;)V   与异常详细信息不匹配:位置:   COM /太阳/ XML /消息/ SAAJ /皂/ SOAPDocumentImpl.createDocumentFragment()Lorg / W3C / DOM /的DocumentFragment;   @ 5:JBinvokespecial Reason:Type   'com / sun / xml / messaging / saaj / soap / SOAPDocumentImpl'(当前帧,   stack [2])不可分配给   'com / sun / org / apache / xerces / internal / dom / CoreDocumentImpl'当前   框架:bci:@ 5标志:{} locals:{   'com / sun / xml / messaging / saaj / soap / SOAPDocumentImpl'} stack:{   '未初始化','未初始化',   'com / sun / xml / messaging / saaj / soap / SOAPDocumentImpl'} at   com.sun.xml.messaging.saaj.soap.SOAPPartImpl。(SOAPPartImpl.java:119)   在   com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl。(SOAPPart1_1Impl.java:89)   在   com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:109)   在   org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:101)   在   org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:78)   在   org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.getOpQName(SOAPHandlerInterceptor.java:294)   在   org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(AbstractJAXWSHandlerInterceptor.java:111)   在   org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:235)   在   org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:144)   在   org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:119)   在   org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:69)   在   org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)   在   org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)   在   org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)   在   org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:368)   在   org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:183)   在   org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:163)   在   org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:145)   在javax.servlet.http.HttpServlet.service(HttpServlet.java:687)at   javax.servlet.http.HttpServlet.service(HttpServlet.java:790)at at   com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)   在[内部课程]

我已经尝试部署打包的自由服务器和服务器目录选项。但它不起作用。 我还尝试使用ibm-web-ext.xml方法更改fileServingEnabled="false"。但它给出了同样的错误。

3 个答案:

答案 0 :(得分:2)

这是由于SOAP CFX Services(可能由应用程序捆绑)和JRE中的库之间的库冲突。

要解决此问题,请将以下内容作为VM参数传递,以指示您的JVM使用与JRE捆绑的适当库(而不是CFX)。

  

javax.xml.soap.MessageFactory =   com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl   javax.xml.soap.SOAPFactory =   com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl   javax.xml.soap.SOAPConnectionFactory =   com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory   javax.xml.soap.MetaFactory =   com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl

答案 1 :(得分:1)

为了扩展Dinesh的答案,为了指示Bluemix JVM使用捆绑的库(而不是CFX),将以下内容添加到服务器根目录中的jvm.options(必要时创建) :

-Djavax.xml.soap.MessageFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
-Djavax.xml.soap.SOAPFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl
-Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory
-Djavax.xml.soap.MetaFactory=com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl

答案 2 :(得分:0)

只是为了扩展Justin所说的,如果您正在使用Liberty Server并通过CLI推送它,那么这是运行的命令

cf set-env WebServicesSOAP IBM_JAVA_OPTIONS "-Djavax.xml.soap.MessageFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -Djavax.xml.soap.SOAPFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl -Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory -Djavax.xml.soap.MetaFactory=com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl"

PS:有关cf命令的更多信息,请转到here