我正在将 EAR 部署到 JBoss AS 7.1.1,其结构如下:
GrahamsProj.EAR
GrahamsProjClient.WAR
app/GrahamsProjClient.jar
GrahamsProjServer.EAR
GrahamsProjServer.jar
每次我部署 EAR 并启动 JBoss 时,我都会收到此错误:
JBAS014775: New missing/unsatisfied dependencies:service jboss.deployment.unit."GrahamsProjServer.ear".PARSE (missing) dependents: [service jboss.deployment.subunit."GrahamsProjServer.ear"."GrahamsProjServer.jar".PARSE]
17:19:10,129 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"GrahamsProjServer.ear\".\"GrahamsProjServer.jar\".PARSEjboss.deployment.unit.\"GrahamsProjServer.ear\".PARSEMissing[jboss.deployment.subunit.\"GrahamsProjServer.ear\".\"GrahamsProjServer.jar\".PARSEjboss.deployment.unit.\"GrahamsProjServer.ear\".PARSE]"]}}}
如您所见,错误是说我的服务器(GrahamsProjServer.ear)找不到依赖项。
我通过谷歌搜索“新的缺失/不满足的依赖项 jboss 为 7”查找了错误,我得到了广泛的答案。两个常见的问题似乎是standalone.xml 中的数据源问题和jboss-deployment-structure.xml 中的问题。
这是我来自standalone.xml的数据源:
<datasources>
<datasource jta="true" jndi-name="java:jboss/datasources/WorkCenterDS" pool-name="OracleDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:oracle:thin:@MCOSRVORCL001:1521:support</connection-url>
<driver>oracle</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>grahamsproj</user-name>
<password>airit</password>
</security>
</datasource>
<drivers>
<driver name="oracle" module="com.oracle.ojdbc14">
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>
</drivers>
</datasources>
这是jboss-deployment-structure.xml
位于我的 WAR 文件的 WEB-INF 文件夹中的那个。
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="GrahamsProjServer.GrahamsProjServer.jar"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
如果我摆脱jboss-deployment-structure.xml
了同样的错误,就会出现。所以它似乎没有什么不同。我的问题可能与这些事情中的任何一个都不相关。有人看到发生了什么吗?
这是我application.xml
在服务器上的:
<application>
<display-name>GrahamsProj</display-name>
<description>GrahamsProj</description>
<application-name>GrahamsProjServer</application-name>
<module>
<ejb>GrahamsProjServer.jar</ejb>
</module>
</application>