[英]LinkageError - loading contraint violation
I am facing LinkageError in websphere application server(8.5.5.14).我在 websphere 应用程序服务器(8.5.5.14)中面临 LinkageError。 A similar issue found here LinkageError
在这里发现了一个类似的问题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引起:java.lang.LinkageError:加载约束冲突时解析方法“javax/xml/soap/SOAPElement.getElementQName()Ljavax/xml/namespace/QName;”:加载程序“com/ibm/ws/classloader/CompoundClassLoader@19d4f90e “class”的“org/springframework/ws/soap/saaj/SaajSoapElement”和class“javax/xml/soap/SOAPElement”的加载程序“com/ibm/oti/vm/BootstrapClassLoader@ca532309”有不同的类型
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. 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. 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),或通过将 class 加载切换到父优先。 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.
Parent-last class 加载通常容易受到此类问题的影响,因为它允许 class 加载器之间的重复加载比默认设置下通常可能的加载更多。 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.
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.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.