1

使用 jboss-as-7.1.1.Final 部署我的项目时,我刚刚被错误阻止。

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Err
or loading jboss-structure.xml from C:\...\myproject.war\WEB-INF\jboss-deploy
ment-structure.xml
        at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureD
escriptorParser.parse(DeploymentStructureDescriptorParser.java:277) [jboss-as-se
rver-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureD
escriptorParser.parse(DeploymentStructureDescriptorParser.java:249) [jboss-as-se
rver-7.1.1.Final.jar:7.1.1.Final]

这是我的 jboss-deployment-sturcture.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
    <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
        <exclusions>
            <module name="org.apache.log4j" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>

如果有人知道此错误的解决方案,请帮助我。太棒了!

4

1 回答 1

1

检查部署结构的女巫版本在您的 JBoss AS 上可用。

我不得不将部署结构的版本更改为 1.1:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
    <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
        <exclusions>
            <module name="org.apache.log4j" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>
于 2013-09-16T13:07:37.333 回答