[英]java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method
I have developed a web service with authentication in java following the link Web Service Atuthentication The Same is runing fine if I am using JDK 1.6/JBoss 4.2 but when I deploy it in Jboss 5.1.0 GA I am getting deployment error. 我已经通过链接Web Service Atuthentication在Java中开发了一个带有身份验证的Web服务,如果我使用的是JDK 1.6 / JBoss 4.2,则运行相同,但是在Jboss 5.1.0 GA中进行部署时却遇到了部署错误。 I google and found there is some jar conflict between JDK1.6,Jboss and my application.
我在Google上搜索,发现JDK1.6,Jboss和我的应用程序之间存在jar冲突。 And replaced the JBoss/lib/endorsed jaxws-ri.jar with the latest jaxws-ri-2.2.8.jar.
并用最新的jaxws-ri-2.2.8.jar替换了JBoss / lib /认可的jaxws-ri.jar。 But I am not able to identify which jar is creating conflict now.
但是我现在无法确定哪个jar正在引起冲突。
Below is my code of web.xml, sun-jaxws.xml and exception. 下面是我的web.xml,sun-jaxws.xml和异常代码。
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>biservices</display-name>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>BiServices</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>BiServices</servlet-name>
<url-pattern>/biservices</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
sun-jaxws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
<endpoint
name="IBiUpdate"
implementation="com.sbilife.ws.BiUpdate"
url-pattern="/biservices"/>
</endpoints>
exception
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "com.sun.xml.ws.util.xml.XMLStreamReaderFilter.getAttributeName(I)Ljavax/xml/namespace/QName;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/util/xml/XMLStreamReaderFilter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamReader have different Class objects for the type javax/xml/namespace/QName used in the signature
Thanks Pise 谢谢佩斯
The exception is thrown because in your web application at least exists a jar which contains the javax.xml.namespace.QName
class and that class conflicts with the same one contained in one of the JBoss's jar. 引发异常是因为在您的Web应用程序中至少存在一个jar,其中包含
javax.xml.namespace.QName
类,并且该类与JBoss的jar中包含的同一类冲突。
You should remove that (these) jar(s) from your web application when deploying on JBoss. 在JBoss上部署时,应从Web应用程序中删除该(这些)jar。
A list of jars which contain the javax.xml.namespace.QName
class is at http://www.findjar.com/class/javax/xml/namespace/QName.html 包含
javax.xml.namespace.QName
类的jar的列表位于http://www.findjar.com/class/javax/xml/namespace/QName.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.