Jboss 15.0.1.Final, Java 11 + SOAP
frantisek.sichinger May 20, 2019 8:58 AMHello everyone,
I'm facing rather a strange error when running Jboss 15.0.1.Final on Java 11 (OpenJDK).
I'm attempting to send a SOAP message via a client generated from WSDL (generated via apache CXF).
The stacktrace:
```
Interceptor for {anUrl}XXX#{anUrl}XXX has thrown exception, unwinding now: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
at java.xml/com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:356)
at java.xml/com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:287)
at java.xml/com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:237)
at org.apache.ws.security@2.2.3//org.apache.wss4j.dom.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:317)
at org.apache.ws.security@2.2.3//org.apache.wss4j.dom.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:438)
at org.apache.ws.security@2.2.3//org.apache.wss4j.dom.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:165)
at org.apache.ws.security@2.2.3//org.apache.wss4j.dom.handler.WSHandler.doSenderAction(WSHandler.java:117)
at org.apache.cxf.ws-security@3.2.5.jbossorg-1//org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$100(WSS4JOutInterceptor.java:57)
at org.apache.cxf.ws-security@3.2.5.jbossorg-1//org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessageInternal(WSS4JOutInterceptor.java:275)
at org.apache.cxf.ws-security@3.2.5.jbossorg-1//org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:147)
at org.apache.cxf.ws-security@3.2.5.jbossorg-1//org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:132)
at org.apache.cxf@3.2.5.jbossorg-1//org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf@3.2.5.jbossorg-1//org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:537)
at org.apache.cxf@3.2.5.jbossorg-1//org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:446)
at org.apache.cxf@3.2.5.jbossorg-1//org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:361)
at org.apache.cxf@3.2.5.jbossorg-1//org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
at org.apache.cxf.impl//org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.impl//org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
```
In a case i deciede to unit test the library alone, everything works.
if i migrate my entire environment back to Java 8 this SOAP call works fine.
I tried to manually update cxf libraries within the package wildfly-15.0.1.Final/modules/system/layers/base/org/apache/cxf to more recent version, but the issue remained.