在将应用程序从JBOSS EAP 5.2.1迁移到JBOSS EAP 6.3.0时,我收到以下链接错误。
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/txo/amaster]] (ServerService Thread Pool -- 60) JBWEB000287: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.LinkageError: loader constraint violation: when resolving method "org.dom4j.io.SAXReader.setEntityResolver(Lorg/xml/sax/EntityResolver;)V" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/jboss/seam/util/XML, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for resolved class, org/dom4j/io/SAXReader, have different Class objects for the type setEntityResolver used in the signature
at org.jboss.seam.util.XML.getRootElement(XML.java:22) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:227) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.jboss.seam.init.Initialization.create(Initialization.java:134) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_11]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
你能指导我解决这些错误吗?
答案 0 :(得分:1)
我已经解决了这个问题。在dom4j module.xml中,我更改了依赖项的顺序,也提供了export =" true"
<module xmlns="urn:jboss:module:1.1" name="org.dom4j">
<properties>
<property name="jboss.api" value="unsupported"/>
</properties>
<resources>
<resource-root path="dom4j-1.6.1.redhat-6.jar"/>
</resources>
<dependencies>
<module name="com.sun.xml.bind"/>
<module name="javax.xml.bind.api"/>
<module name="org.jaxen"/>
<module name="javax.api" export="true"/> <!-- This one always goes last. -->
</dependencies>
</module>