我正在尝试运行最初在 JBoss 4.2.3.GA 上运行的 JBoss 服务存档 (sar),现在在 JBoss 6.1.0.Final 上运行。我发现在 JBoss 6.1.0 启动时,正在调用 sar 的 createService 方法,而不是 startService 方法。控制台上没有显示错误或异常。如果我访问 jmx-console,我可以看到服务状态为 create (state=6)。我可以通过手动调用 start 方法从 jmx-console 成功启动服务 - 状态变为启动(状态 = 3)。当我这样做时,控制台中不会报告任何错误或异常。
我现在停止 JBoss 并添加另一个依赖于上述 sar(sar 1)的 sar(我们称之为 sar 2),然后启动 JBoss。在这种情况下,我发现 JBoss 抱怨 sar 2 无法加载,因为它依赖于 sar 1 处于启动状态但它处于创建状态。日志片段如下。任何有关 JBoss 4.2.3.GA 和 6.1.0.Final 之间差异的见解都会导致这种情况。
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "quantum:service=dns" is missing the following dependencies:
Dependency "quantum:service=notificationAgent" (should be in state "Start", but is actually in state "Create")
DEPLOYMENTS IN ERROR:
Deployment "quantum:service=notificationAgent" is in error due to the following reason(s): Create
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]
at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]