You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by lechlukasz <l....@ringler.ch> on 2019/10/02 09:52:32 UTC

Re: Loader constraint violation: javax.xml.soap.SOAPFault

Hello,

I've found something out.
The exception comes from:

java.lang.LinkageError: javax/xml/soap/SOAPFault
at javax.xml.ws.soap.SOAPFaultException.<init>(SOAPFaultException.java:63)
~[?:?]
at
org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:195)
~[?:?]
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
~[?:?]

The class javax.xml.ws.soap.SOAPFaultException comes from system bundle (0),
which means, it has loaded javax.xml.soap.SOAPFault from JRE.

However, system bundle doesn't export javax.xml.soap package, it comes (in
my case) from org.apache.servicemix.specs.saaj-api-1.3

If I understand it correctly, the proxy generated by CXF, called from my
module, with my module's class loader, has loaded  javax.xml.soap.SOAPFault
definition from org.apache.servicemix.specs.saaj-api-1.3, while
javax.xml.ws.soap.SOAPFaultException is bound with class definition loaded
from JRE, which generates LinkageError.

Could you check if it is plausible, and what is the possible workaround?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html