我必须在我的wildfly服务器中为两只耳朵设置部署顺序。 我的双耳结构如下:
EAR1
|
|--XYZ.war
|--rule.jar
|--common.jar
EAR2
|
|--abc.war
|--rule.jar
|--common.jar
所以我需要的是,我需要在EAR2之前在服务器中部署第一个EAR1。
我尝试了很多。使用此链接How to set deployment order of two ears in Wildfly ..我尝试在EAR2中创建jboss-all.xml,如下所示:
<jboss xmlns="urn:jboss:1.0">
<jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">
<dependency name="EAR1.ear" />
</jboss-deployment-dependencies>
</jboss>
但没有运气。
然后我尝试使用http://www.mastertheboss.com/jboss-server/jboss-deploy/configuring-jboss-as-7-deployment-order。我创建了jboss-deployment-structure.xml。在EAR2。如下:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deployment.EAR1.ear" />
</dependencies>
</deployment>
</jboss-deployment-structure>
我得到的例外情况如下:
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "EAR2.ear")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.module.service.\"deployment.EAR2.ear.rule.jar\".main is missing [module.resolved.service.\"deployment.EAR2.ear.rule.jar\".main]",
"jboss.module.resolve.phase.\"deployment.EAR2.ear\".main.1 is missing [jboss.module.spec.service.\"deployment.configurator.ear\".main]",
"jboss.module.resolve.phase.\"deployment.EAR2.ear.abc.war\".main.2 is missing [jboss.module.spec.service.\"deployment.configurator.ear\".main]",
"jboss.module.service.\"deployment.EAR2.ear.abc.war\".main is missing [module.resolved.service.\"deployment.EAR2.ear.abc.war\".main]",
"jboss.module.resolve.phase.\"deployment.EAR2.ear.rule.jar\".main.2 is missing [jboss.module.spec.service.\"deployment.configurator.ear\".main]",
"jboss.module.service.\"deployment.EAR2.ear.ConfiguratorCommon.jar\".main is missing [module.resolved.service.\"deployment.EAR2.ear.ConfiguratorCommon.jar\".main]",
"jboss.module.resolve.phase.\"deployment.EAR2.ear.ConfiguratorCommon.jar\".main.2 is missing [jboss.module.spec.service.\"deployment.configurator.ear\".main]",
"jboss.module.service.\"deployment.EAR2.ear\".main is missing [module.resolved.service.\"deployment.EAR2.ear\".main, jboss.module.spec.service.\"deployment.configurator.ear\".main]"
]}
15:37:51,407 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "ojdbc6.jar" (runtime-name : "ojdbc6.jar")
15:37:51,407 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "db2jcc4.jar" (runtime-name : "db2jcc4.jar")
15:37:51,407 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "EAR2.ear" (runtime-name : "EAR2.ear")
15:37:51,407 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "EAR1.ear" (runtime-name : "EAR1.ear")
15:37:51,412 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.module.spec.service."deployment.configurator.ear".main (missing) dependents: [service jboss.module.resolve.phase."deployment.EAR2.ear.ConfiguratorCommon.jar".main.2, service jboss.module.resolve.phase."deployment.EAR2.ear.rule.jar".main.2, service jboss.module.service."deployment.EAR2.ear".main, service jboss.module.resolve.phase."deployment.EAR2.ear".main.1, JBAS014799: ... and 2 more ]
service module.resolved.service."deployment.EAR2.ear".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear".main]
service module.resolved.service."deployment.EAR2.ear.ConfiguratorCommon.jar".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear.ConfiguratorCommon.jar".main]
service module.resolved.service."deployment.EAR2.ear.abc.war".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear.abc.war".main]
service module.resolved.service."deployment.EAR2.ear.rule.jar".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear.rule.jar".main]
15:37:51,471 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
15:37:51,471 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
15:37:51,471 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 171584ms - Started 1607 of 1795 services (12 services failed or missing dependencies, 284 services are lazy, passive or on-demand)
15:37:51,682 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015974: Stopped subdeployment (runtime-name: ConfiguratorCommon.jar) in 14ms
15:37:51,683 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: abc.war) in 15ms
15:37:51,687 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015974: Stopped subdeployment (runtime-name: rule.jar) in 19ms
15:37:51,791 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment EAR2.ear (runtime-name: EAR2.ear) in 127ms
15:37:51,890 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "EAR2.ear" (runtime-name: "EAR2.ear")
15:37:51,890 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.module.service."deployment.EAR2.ear".main (missing) dependents: [service jboss.deployment.unit."EAR2.ear".FIRST_MODULE_USE]
service jboss.module.service."deployment.EAR2.ear.ConfiguratorCommon.jar".main (missing) dependents: [service jboss.deployment.subunit."EAR2.ear"."ConfiguratorCommon.jar".FIRST_MODULE_USE]
service jboss.module.service."deployment.EAR2.ear.abc.war".main (missing) dependents: [service jboss.deployment.subunit."EAR2.ear"."abc.war".FIRST_MODULE_USE]
service jboss.module.service."deployment.EAR2.ear.rule.jar".main (missing) dependents: [service jboss.deployment.subunit."EAR2.ear"."rule.jar".FIRST_MODULE_USE]
service jboss.module.spec.service."deployment.EAR2.ear".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear".main]
service jboss.module.spec.service."deployment.EAR2.ear.ConfiguratorCommon.jar".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear.ConfiguratorCommon.jar".main, service jboss.module.service."deployment.EAR2.ear".main, service jboss.deployment.unit."EAR2.ear".FIRST_MODULE_USE, service jboss.module.service."deployment.EAR2.ear.abc.war".main]
service jboss.module.spec.service."deployment.EAR2.ear.abc.war".main (missing) dependents: [service jboss.deployment.unit."EAR2.ear".FIRST_MODULE_USE, service jboss.module.service."deployment.EAR2.ear.abc.war".main]
service jboss.module.spec.service."deployment.EAR2.ear.rule.jar".main (missing) dependents: [service jboss.module.service."deployment.EAR2.ear.ConfiguratorCommon.jar".main, service jboss.module.service."deployment.EAR2.ear.rule.jar".main, service jboss.module.service."deployment.EAR2.ear".main, service jboss.deployment.unit."EAR2.ear".FIRST_MODULE_USE, JBAS014799: ... and 2 more ]
部署失败。 有人可以帮帮我吗。 如果我需要添加更多文档,请告诉我。
提前致谢。
答案 0 :(得分:0)
1您正在使用扫描仪,因此没有预定义的订单。 如果您使用的是WildFly 10,则扫描程序上的属性“runtime-failure-cause-rollback”可以设置为false。因此,第一只耳朵不会回滚,并会在第二只耳朵开始时检测到依赖性。