gpt4 book ai didi

java.lang.LinkageError : loader constraint violation in interface itable initialization: when resolving method

转载 作者:太空宇宙 更新时间:2023-11-04 07:16:50 25 4
gpt4 key购买 nike

我已经开发了一个带有 java 身份验证的 Web 服务,链接为 Web Service Atuthentication如果我使用 JDK 1.6/JBoss 4.2,则运行正常,但当我在 Jboss 5.1.0 GA 中部署它时,出现部署错误。我google了一下,发现JDK1.6、Jboss和我的应用程序之间存在一些jar冲突。并将 JBoss/lib/endorsed jaxws-ri.jar 替换为最新的 jaxws-ri-2.2.8.jar。但我现在无法识别哪个 jar 正在产生冲突。

下面是我的 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

谢谢皮斯

最佳答案

抛出异常是因为您的 Web 应用程序中至少存在一个包含 javax.xml.namespace.QName 类的 jar,并且该类与 JBoss 的 jar 之一中包含的相同类发生冲突。

在 JBoss 上部署时,您应该从 Web 应用程序中删除该(这些)jar。

包含 javax.xml.namespace.QName 类的 jar 列表位于 http://www.findjar.com/class/javax/xml/namespace/QName.html

关于java.lang.LinkageError : loader constraint violation in interface itable initialization: when resolving method,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19856567/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com