Fails to deploy more than one application with JMS/hornetQ support in Jboss 7.1.0.Final
nibin012 Mar 28, 2012 4:04 PMHi All,
I have tried deploying multiple WAR applications to JBOSS 7.1.0.Final with JMS/horntQ support. If I am deploying only one WAR application, then my deployment is successful. But if I have more than one WAR application, then my deployment fails with the following error.
01:35:46,616 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."security.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."security.war".INSTALL: Failed to process phase INSTALL of deployment "security.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.pojo."org.jboss.netty.internal.LoggerConfigurator".DESCRIBED is already registered
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.as.pojo.ParsedKernelDeploymentProcessor.describeBean(ParsedKernelDeploymentProcessor.java:94)
at org.jboss.as.pojo.ParsedKernelDeploymentProcessor.deploy(ParsedKernelDeploymentProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
I found the issue was coz of Netty trying to register its logging factory as defined in netty.jar/META-INF/jboss-beans.xml. I am not packaging any jms/hornetQ libraries inside my WAR. In my setting for each WAR application, I have added the required Dependencies in the MANIFEST.MF file.
My application is not using any MDB's or anything. Its a fair and clean JMS client written for reciever/sender and the application tries to validate the queue's setting during deployment phase through a listener invoked by context initialized hook. As it can be seen from the logs, my first WAR deploys succesfully(not shown in the log) but from my second WAR application onwards, it fails to deploy(see the log).
Does that mean that I can have only one application inside JBOSS to use messaging ?
PS: If required I can write sample WAR applications to prove this issue. Let me know. Similar setting works with Jboss 6.0.0.Final. I am trying to migrate my applications to Jboss 7
Sample applications to demonstrate the problem
-
standalone-full.xml 20.4 KB
-
SampleApps.zip 7.3 MB