3 Replies Latest reply on Mar 23, 2012 3:00 AM by Masao Kunii

    Cannot use JMS bridge with hornetq-deployers-jboss-beans.xml

    Masao Kunii Newbie

      Hi

       

      I am testing each HornetQ feature to use in our production. We use HornetQ2.2.5-GA on JBoss EAP5.1.1.

      I found that JMS bridge cannot be deployed when we install HornetQ with switch.sh in jboss-eap-hornetq-5.1.1-tech-preview-installer.zip.

      Here is a part of server.log when I started up JBoss:

      2011-08-09 18:38:04,716 WARNING [org.hornetq.jms.bridge.impl.JMSBridgeImpl] (main) Failed to connect bridge
      javax.naming.NameNotFoundException: queue not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
              at sun.rmi.transport.Transport$1.run(Transport.java:177)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:636)
              at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
              at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
              at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)
              at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
              at javax.naming.InitialContext.lookup(InitialContext.java:409)
              at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:58)
              at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:40)
              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1086)
              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:345)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
              at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:243)
              at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:111)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
              at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
              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.install(AbstractController.java:778)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)
              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.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
              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.install(AbstractController.java:778)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
              at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
              at org.jboss.Main.boot(Main.java:221)
              at org.jboss.Main$1.run(Main.java:556)
              at java.lang.Thread.run(Thread.java:636)
      2011-08-09 18:38:04,717 WARNING [org.hornetq.jms.bridge.impl.JMSBridgeImpl] (main) Failed to start bridge
      
      

        

      While JBoss is deploying JMS bridge, failed to look up the target queue. I attach our JMS bridge setting. I don't think it is miss setting because it works properly when I change HornetQ component in our server profile like legacy deploying way (removing /deployers/hornetq-deployers-jboss-beans.xml and renaming /deploy/hornetq directory to /deploy/hornetq.sar).

       

      HornetQ deploying procedure is this order:

      1) HornetQServer (deploy/hornetq/hornetq-jboss-beans.xml)

      2) JMSBridge (deploy/hornetq/hornetq-jboss-beans.xml)

      3) HornetQJMSRealDeployer (deployers/hornetq-deployers-jboss-beans.xml)

       

      I tracked deploying process with a debugger and found the difference between these deploying ways.

      Legacy deploying:

      - At 1), JMS queues are deployed at HornetQServer#start().

      - At 2), the queues available at JMSBridge#start().

      This is no problem but

      Default deploying:

      - At 1), JMS queues are *NOT* deployed at HornetQServer#start().

      - At 2), the queues cannot be looked up at JMSBridge#start() and the error occurs.

      - At 3), JMS queues are deployed at here finally, but it is too late.

         

      Is there any other way to configure for JMS bridge?

       

       

      Thanks,

      Masao