2012-12-30 31 views
0

我有一個非常簡單的EJB3項目,我試圖在JBoss AS 7.1.1上部署,但出現以下錯誤在部署時:帶有1個SSB和1個支持jar的簡單EAR不會部署在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> 

爲什麼會這樣失敗?

回答

0

你不應該在你的application.xml中包含'supports jar'。您使用的<module><java>標籤用於所謂的應用程序客戶端容器

只要刪除該模塊聲明。/lib已經是Java EE將掃描實用程序jar的默認目錄(就像war-archive中的WEB-INF/lib一樣)。

+0

明白了。謝謝! – mindcrime