0 Replies Latest reply: Oct 31, 2011 9:00 AM by Sapan Vashishth RSS

    HornetQ exception when configuring hrnetq/jms-ds.xml

    Sapan Vashishth Newbie

      Hi

       

      I try to subscribe to a remote topic on jboss6.0.0.final from another jboss6

      both are running on same machine with different port setting

       

      Server01 which has the topic to subscribe to

      server02 where the MDB is to be deployed

       

      I created the topic to the server01 and went on wiht changing the ra.xml and jms-ds.xml

       

      in ra.xml on server02 I changed

       

      <resourceadapter>

            <resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>

            <config-property>

               <description>The transport type</description>

               <config-property-name>ConnectorClassName</config-property-name>

               <config-property-type>java.lang.String</config-property-type>

               <config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>

            </config-property>

            <config-property>

               <description>The transport configuration. These values must be in the form of key=val;key=val;</description>

               <config-property-name>ConnectionParameters</config-property-name>

               <config-property-type>java.lang.String</config-property-type>

               <config-property-value>host=127.0.0.1;port=1199</config-property-value>

            </config-property>

       

       

      andin jms-ds.xml I added

       

      <!-- Remote JMS Provider -->

         <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=DefaultJMSProvider,server=localhost">

            <attribute name="ProviderName">RemoteJMSProvider</attribute>

            <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

            <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>

            <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>

            <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>

            <attribute name="Properties">

             java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

             java.naming.factory.url.pkgs=org.jnp.interfaces

             java.naming.provider.url=127.0.0.1:1199

            </attribute>

         </mbean>

          <no-tx-connection-factory>

            <jndi-name>JmsNonXA</jndi-name>

            <rar-name>hornetq-ra.rar</rar-name>

            <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>

            <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property>

            <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/RemoteJMSProvider</config-property>

            <max-pool-size>20</max-pool-size>

         </no-tx-connection-factory>

       

       

       

      when I save the jms-ds.xml I get the following exception on the same server

       

      2011-10-31 18:08:49,744 TRACE [org.jboss.deployers.plugins.deployers.DeployersImpl] (HDScanner) Not moving DeploymentControllerContext@f38f6f{name=vfs:///F:/sapan/packs/jboss-6.0.0.Final/server/default/deploy/hornetq/jms-ds.xml target=null state=**ERROR** mode=Manual requiredState=Real depends=AbstractDependencyInfo@190b03c{} error=org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.jca:service=ManagedConnectionFactory,name=JmsXA

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

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:125)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49)

          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:1832)

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

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

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

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

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

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

          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

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

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

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

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

          at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)

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

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

          at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)

          at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143)

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240)

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192)

          at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57)

          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74)

          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95)

          at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)

          at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)

          at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)

          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)

          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135)

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146)

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90)

          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: javax.resource.ResourceException: Resource adapter is org.hornetq.ra.HornetQResourceAdapter@5d15c6

          at org.hornetq.ra.HornetQRAManagedConnectionFactory.setResourceAdapter(HornetQRAManagedConnectionFactory.java:301)

          at org.jboss.resource.connectionmanager.ManagedConnectionFactoryDeployment.startService(ManagedConnectionFactoryDeployment.java:432)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:355)

          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:301)

          at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:121)

          at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)

          at $Proxy41.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)

          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:379)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)

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

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

          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

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

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

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

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

          at org.jboss.system.ServiceController.doChange(ServiceController.java:671)

          at org.jboss.system.ServiceController.start(ServiceController.java:443)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102)

          ... 42 more

       

       

       

       

       

      Seeing the code I find that the object is checked for instanceof this same class for which exception is thrown

       

       

      Can someone please guide me what is done wrong here

       

      Any help would be highly appreciated

       

      BR

      Sapan