0

我尝试在 JBoss AS 7.1.1 上部署一个非常简单的 EJB3 项目,但在部署时出现以下错误:

04:04:07,806 INFO  [org.jboss.as.repository] (HttpManagementService-threads - 3) JBAS014900: Content added at location /usr/servers/jboss-as-7.1.1.Final/standalone  /data/content/bf/96c04e5d7d6d2147cd1c85eb6f7cc18805dfcb/content
04:04:13,367 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "simplecalculatorejb.ear"
04:04:13,453 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "simplecalculatorejb.jar"
04:04:13,454 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "lib/simplecalculatorejbcommon.jar"
04:04:13,707 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment lib/simplecalculatorejbcommon.jar in 3ms
04:04:13,708 INFO  [org.jboss.as.server] (HttpManagementService-threads - 3) JBAS015870: Deploy of deployment "simplecalculatorejb.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"simplecalculatorejb.ear\".PARSEjboss.deployment.subunit.\"simplecalculatorejb.ear\".\"lib/simplecalculatorejbcommon.jar\".STRUCTUREMissing[jboss.deployment.unit.\"simplecalculatorejb.ear\".PARSEjboss.deployment.subunit.\"simplecalculatorejb.ear\".\"lib/simplecalculatorejbcommon.jar\".STRUCTURE]"]}
04:04:13,715 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2)  JBAS015877: Stopped deployment simplecalculatorejb.jar in 11ms
04:04:13,723 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment simplecalculatorejb.ear in 19ms
04:04:13,729 INFO  [org.jboss.as.controller] (HttpManagementService-threads - 3) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
  service jboss.deployment.subunit."simplecalculatorejb.ear"."lib/simplecalculatorejbcommon.jar".STRUCTURE (missing) dependents: [service jboss.deployment.unit."simplecalculatorejb.ear".PARSE] 

我的耳朵是这样的:

simplecalculatorejb.ear 

 --- simplecalculatorejb.jar

 --- lib/simplecalculatorejbcommon.jar

 --- META-INF/application.xml

和 application.xml 看起来像:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
<application>
    <display-name>simplecalculatorear</display-name>
    <module>
        <ejb>simplecalculatorejb.jar</ejb>
    </module>
    <module>
        <java>lib/simplecalculatorejbcommon.jar</java>
    </module>
</application>

关于为什么会这样失败的任何想法?

4

1 回答 1

0

您不应该在 application.xml 中包含“支持 jar”。您使用的<module><java>标签用于所谓的Application Client Container

只需删除该模块声明。/lib 已经是 Java EE 将扫描实用程序 jar 的默认目录(就像战争档案中的 WEB-INF/lib 一样)。

于 2012-12-30T13:34:21.673 回答