具有1个SSB和1个支持jar的简单EAR将不会部署在JBoss AS 7.1.1上

时间:2012-12-30 08:30:48

标签: java jboss java-ee-6 packaging ejb-3.1

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

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>

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

1 个答案:

答案 0 :(得分:0)

您不应将'支持jar'包含在application.xml中。您使用的<module><java>代码用于所谓的应用程序客户端容器

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