当前位置: 首页 > 知识库问答 >
问题:

Dom4J IllegalAccesserRor-Seam on JBoss7部署错误

邵阳辉
2023-03-14

我正在将一个遗留应用程序迁移到Maven(希望以后不再使用Seam)。已经有许多故障和小故障,AFAIK Seam在依赖版本方面真的很变化无常。

12:42:37,694 INFO  [javax.servlet.ServletContextListener] (MSC service thread 1-6) Welcome to Seam 2.3.1.Final
12:42:38,745 INFO  [org.jboss.seam.init.Initialization] (MSC service thread 1-6) reading /WEB-INF/components.xml
12:42:38,749 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (MSC service thread 1-6) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.IllegalAccessError: tried to access class org.dom4j.io.SAXHelper from class org.dom4j.io.SAXReader
    at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894) [dom4j-1.6.1.jar:1.6.1]
    at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715) [dom4j-1.6.1.jar:1.6.1]
    at org.dom4j.io.SAXReader.read(SAXReader.java:435) [dom4j-1.6.1.jar:1.6.1]
    at org.dom4j.io.SAXReader.read(SAXReader.java:343) [dom4j-1.6.1.jar:1.6.1]
    at org.jboss.seam.util.XML.getRootElement(XML.java:24) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
    at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:227) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
    at org.jboss.seam.init.Initialization.create(Initialization.java:133) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
    at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
[INFO] ------------------------------------------------------------------------
[INFO] Building Core Framework 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ Core ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Core EJB module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ Core-ejb ---
[INFO] com.mycomp:Core-ejb:ejb:1.0-SNAPSHOT
[INFO] +- org.hibernate:hibernate-core:jar:4.2.0.Final:provided
[INFO] |  \- (dom4j:dom4j:jar:1.6.1:provided - omitted for duplicate)
[INFO] +- dom4j:dom4j:jar:1.6.1:provided
[INFO] \- org.jdom:jdom:jar:1.1.2:provided
[INFO]    \- jaxen:jaxen:jar:1.1.3:provided
[INFO]       \- (dom4j:dom4j:jar:1.6.1:provided - omitted for duplicate)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Core Web module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ Core-web ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Project EJB module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ project-ejb ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Project Web module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ project-web ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Core EAR module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ Core-ear ---
[WARNING] Using Maven 2 dependency tree to get verbose output, which may be inconsistent with actual Maven 3 resolution

芯耳POM:

...
<dependencies>
    <!-- project specific dependencies -->
    <dependency>
        <groupId>com.mycomp</groupId>
        <artifactId>project-web</artifactId>
        <version>${logis.artifact.version}</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>com.mycomp</groupId>
        <artifactId>project-ejb</artifactId>
        <version>${logis.artifact.version}</version>
        <type>ejb</type>
    </dependency>

    <!-- Seam dependency -->
    <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam</artifactId>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <!-- Tell Maven we are using Java EE 6 -->
                <version>6</version>
                <!-- Use Java EE ear libraries as needed. Java EE ear libraries are 
                    in easy way to package any libraries needed in the ear, and automatically 
                    have any modules (EJB-JARs and WARs) use them -->
                <defaultLibBundleDir>lib</defaultLibBundleDir>
                <!-- See maven docs; Necessary because we CAN'T have 2 jboss-seam.jars 
                    in the same EAR -->
                <skinnyWars>true</skinnyWars>
                <initializeInOrder>true</initializeInOrder>
                <modules>
                    <!-- Explicitly excluding core framework artifacts, as they get merged 
                        (shaded) into the project artifacts -->
                    <ejbModule>
                        <groupId>com.mycomp</groupId>
                        <artifactId>core-ejb</artifactId>
                        <excluded>true</excluded>
                    </ejbModule>

                    <!-- <webModule>
                        <groupId>com.mycomp</groupId>
                        <artifactId>core-web</artifactId>
                        <excluded>true</excluded>
                    </webModule> -->

                    <!-- Project specific part -->
                    <ejbModule>
                        <groupId>com.mycomp</groupId>
                        <artifactId>project-ejb</artifactId>
                        <!-- Manually set jar name, because many JndiNames in logis hard-code 
                            that name -->
                        <bundleFileName>core.jar</bundleFileName>
                    </ejbModule>
                    <webModule>
                        <groupId>com.mycomp</groupId>
                        <artifactId>project-web</artifactId>
                        <contextRoot>/</contextRoot>
                    </webModule>

                    <!-- Need to include Seam as a module so it will be "executed" and 
                        can initialize itself -->
                    <jarModule>
                        <groupId>org.jboss.seam</groupId>
                        <artifactId>jboss-seam</artifactId>
                        <includeInApplicationXml>true</includeInApplicationXml>
                        <bundleDir>/</bundleDir>
                    </jarModule>
                </modules>
            </configuration>
        </plugin>
...

共有1个答案

邰昀
2023-03-14

无论如何,它看起来与类路径上的多个版本发生了冲突。

有一个公司特定的模块,它只是一堆罐子卷成一个模块。在确定路径上只有一个jdom-*.jar之后,它就工作了。

 类似资料:
  • 我在过去多次部署Firebase功能。由于某些原因,最近(大约2-3天)我经常在部署时出错。我使用windows来释放代码。当我尝试在我的Linux系统和Mac系统中设置相同的项目时,部署工作正常。从Windows环境发布可能存在的问题。 以下是部署时遇到的问题。 ! 功能[付款(us-central1)]:部署错误。加载用户代码时函数失败。这可能是由于用户代码中的错误造成的。错误消息:错误:请检

  • 我使用的是Tomcat7.0.20和Grails1.3.7,在部署war文件时,我遇到了这个错误。 AM org.apache.Catalina.startup.hostconfig deployWAR信息:部署web应用程序存档ih-core.war 2013年2月25日1:55:35AM org.apache.Catalina.core.containerbase AddChildinal严重

  • 我正在使用ant脚本构建应用程序。此应用程序在9.2 bea下工作。lib=C:/bea92/weblogic92/server/lib-ant-code-工作正常,但当我切换到12c lib文件夹时。lib=C:/bea12c/wlserver\u 12.1/server/lib,它给了我这个错误:

  • ---作为问题根本原因的MBEANS---objectName:jboss.j2ee:jar=HelloWorldeJB.jar,name=quenemdb01,service=EJB3状态:失败原因:org.jboss.deployment.deploymentException:在激活配置[ActivationConfigProperty(activation ConfigProperty(a

  • 我已经启动了JBPM6.0.1,并与mysql一起运行,没有问题。我已经决定升级到6.1.0。当我使用最新版本运行安装程序(ant install.demo)时,部署每次都失败。h2驱动程序现在干扰了部署(可能)。对这些人有什么帮助...服务器日志错误在下面...

  • 由于某种原因,当我使用Meteor deploy时,我的服务器产生以下错误,我无法访问这些页面。我遇到以下错误: [2015年5月5日星期二20:50:15 GMT+0000(UTC)]警告/meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:245 throw(ex);[2015年5月5日星期二20:50:15 GMT+0000

  • 这是我在POM中的构建详细信息: 这些是我的财产: 以下是我的终端命令: MVN清洁部署-DmuleDeploy-X,我得到以下错误: 如果我使用以下配置,它将成功部署在Cloud dhub中: 不确定我在第一个配置中做错了什么。

  • 问题内容: 我正在尝试通过Intellij IDEA将一个基本为空的项目部署到GAE。我创建了一个新项目,在appengine- web.xml中设置了我的项目ID,并保留了其他所有内容。我收到以下错误,完整日志在这里。 我尝试安装JDK 7,将所有内容都设置为使用该版本,并使用1.7和1.8中的JDK 8编译,似乎没有任何效果。 问题答案: Maven仍在使用Java 8