I am facing LinkageError in websphere application server(8.5.5.14). A similar issue found here LinkageError
Caused by: java.lang.LinkageError: loading constraint violation when resolving method "javax/xml/soap/SOAPElement.getElementQName()Ljavax/xml/namespace/QName;": loader "com/ibm/ws/classloader/CompoundClassLoader@19d4f90e" of class "org/springframework/ws/soap/saaj/SaajSoapElement" and loader "com/ibm/oti/vm/BootstrapClassLoader@ca532309" of class "javax/xml/soap/SOAPElement" have different types for the method signature
The cause of the issue is the inclusion of an XML API jar containing javax/xml/namespace/QName in your application, and that application being configured to use parent-last class loading. When that happens, you get the following linkage pattern:
You can solve this by removing the XML jar containing the QName class from your application (the API is included in the server's JDK), by adding the SOAP API to the application (so the application "sees" both classes from the same location), or by switching your class loading to parent-first. Parent-last class loading is generally vulnerable to issues like this, because it allows for more duplicate loading between class loaders than is typically possible under default settings. If you don't have a very explicit need for your own XML API version (XML APIs have been included in Java SE for a very long time), I'd strongly recommend either removing the jar or switching to parent-first.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.