1

浏览 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

4

1 回答 1

0

rt.jar已经包含QName class,因此需要QName classjaxrpc.jar具有相同包的 QName 类或任何其他 jar 中删除,即javax.xml.namespace(提取 jar,删除 QName 类(从javax.xml.namespace)并重新 jar)。

于 2018-07-30T09:16:07.740 回答