3 Replies Latest reply on Nov 9, 2011 8:50 AM by Yong Hao Gao

    Can't deploy multiple HornetQ-using WARS in JBoss

    mfry35 Newbie

      Newbie question on deploying multiple WARs in JBoss that use HornetQ.

       

      Java 6

      JBoss 5.1.0

      HornetQ 2.2.2 (integrated with JBoss server using the supplied config scripts)

       

      I can deploy a single Java WAR file in JBoss containing Spring-configured JMS producers & consumers. No problem, everything works as expected.

       

      However, as soon as I deploy a second WAR that also contains JMS producers and/or consumers, I get this deployment error.

       

      14:20:27,508 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/jboss-eap-5.1/server/all-with-hornetq/deploy/mytest-1.0-SNAPSHOT.war/ state=PreReal mode=Manual

      requiredState=Real

      org.jboss.deployers.spi.DeploymentException: Error deploying: org.jboss.netty.internal.LoggerConfigurator

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:130)

              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:52)

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)

              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)

              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.IllegalStateException: org.jboss.netty.internal.LoggerConfigurator is already installed.

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:719)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)

              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)

       

       

      I found a clue to what's going on here: http://lists.jboss.org/pipermail/netty-users/2011-June/004541.html

      ("Netty creates a bean for logging in META-INF/jboss-beans.xml")

       

      But that doesn't tell me what I need to do for HornetQ.

       

      Is the problem something to do with having hornetQ/netty jars present in each WAR? I.e. need to exclude them from the WAR and reference unique copies supplied by JBoss?

       

      Any tips (concrete examples) you can provide will be much appreciated, thanks in advance.