Java - javoss.faces.el.E​​valuationException:Jboss中的java.lang.LinkageError

时间:2013-10-30 09:34:18

标签: java jboss classloader linkageerror

浏览JSF应用程序页面时出现Java Linkage错误。该应用程序已部署在Jboss-eap -5.1

错误追踪:

2013-10-30 14:16:54,559 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http-localhost%2F127.0.0.1-8080-4)
    java.lang.LinkageError: loader constraint violation:
        when resolving field "NODESET" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/xpath/XPathConstants,
        and the class loader (instance of <bootloader>) for the field's resolved type, javax/xml/namespace/QName, have different Class objects for that type
javax.faces.el.EvaluationException: java.lang.LinkageError: loader constraint violation: when resolving field "NODESET" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/xpath/XPathConstants, and the class loader (instance of <bootloader>) for the field's resolved type, javax/xml/namespace/QName, have different Class objects for that type
    at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

请问您可能会告诉我可能的原因,或者是否有人遇到类似问题,如何解决? 提前致谢, RDGS, RK

1 个答案:

答案 0 :(得分:0)

rt.jar已经包含QName class,因此需要从QName class或具有QName类且具有相同软件包(即jaxrpc.jar)的任何其他jar中删除javax.xml.namespace(罐子,从javax.xml.namespace中删除QName类,然后重新罐子。