3 Replies Latest reply: Jul 30, 2010 11:05 AM by Joydeep Sarkar RSS

    Problem with JmsNonXA

    Joydeep Sarkar Newbie

      Dear All,

       

      I am facing a problem with JmsNonXA connection. When I try to lookup a MDB, I get the follwing exception.

       

       

      Following the ths stacktrace,

       

      2010-07-30 02:03:50,749 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337]) javax.jms.JMSException: Could not create a session: Unable to get managed connection for JmsNonXA
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:881)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:470)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at com.getty.mms.mq.MQManagerBean.submitIndexRequest(MQManagerBean.java:36)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at java.lang.reflect.Method.invoke(Method.java:597)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
      2010-07-30 02:03:50,750 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
      2010-07-30 02:03:50,751 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at java.lang.reflect.Method.invoke(Method.java:597)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,761 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.advice.org.jboss.ejb3.intercepptors.aop.InvocationContextInterceptor_z_setup_934246606.invoke(InvocationContextInterceptor_z_setup_934246606.java)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,762 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      2010-07-30 02:03:50,763 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,764 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
      2010-07-30 02:03:50,765 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
      2010-07-30 02:03:50,766 ERROR [STDERR] (WorkerThread#0[10.240.132.199:38337])   at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      2010-07-30 02:03:50,779 INFO  [general] (imagenet.system.distribution.impl.DistributorImpl) Loading server info for: imagenet.system.distribution.impl.DistributorImpl
      2010-07-30 02:03:50,824 INFO  [STDOUT] (WorkerThread#0[10.240.132.199:38339]) index request called with mmContext = MMIndexingMQContext{source=IndexRequestSource{id=6, name='Editing of Assets', level=0}, indexingEnvironment=IndexingEnvironment{id=1, name='Oracle Text Indexing : MM'}, updaterUser=0, describedObjectMdBeansList=null} MQContext{siteId=83663313, describedObjectId=139482756, describedObjectType=<enumElement id="1" name="asset">}
      2010-07-30 02:03:50,830 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (WorkerThread#0[10.240.132.199:38339]) Throwable while attempting to get a new connection: null
      javax.resource.ResourceException: Error during setup
              at org.hornetq.ra.HornetQRAManagedConnection.<init>(HornetQRAManagedConnection.java:161)
              at org.hornetq.ra.HornetQRAManagedConnectionFactory.createManagedConnection(HornetQRAManagedConnectionFactory.java:161)
              at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
              at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
              at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:381)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
              at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:837)
              at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:470)
              at com.getty.mms.mq.MQManagerBean.submitIndexRequest(MQManagerBean.java:36)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
              at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
              at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
              at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
              at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_934246606.invoke(InvocationContextInterceptor_z_fillMethod_934246606.java)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
              at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_934246606.invoke(InvocationContextInterceptor_z_setup_934246606.java)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
              at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
              at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
              at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
              at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
              at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
              at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
              at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      Caused by: javax.resource.ResourceException: Failed to initialise session factory
              at org.hornetq.ra.HornetQRAManagedConnection.setup(HornetQRAManagedConnection.java:961)
              at org.hornetq.ra.HornetQRAManagedConnection.<init>(HornetQRAManagedConnection.java:150)
              ... 66 more
      Caused by: javax.jms.JMSException: Failed to initialise session factory
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1043)
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:790)
              at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:558)
              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:602)
              at org.hornetq.jms.client.HornetQConnectionFactory.createXAConnection(HornetQConnectionFactory.java:152)
              at org.hornetq.jms.client.HornetQConnectionFactory.createXAConnection(HornetQConnectionFactory.java:147)
              at org.hornetq.ra.HornetQRAManagedConnection.setup(HornetQRAManagedConnection.java:934)
              ... 67 more
      Caused by: HornetQException[errorCode=0 message=Failed to initialise session factory]
              ... 74 more
       Caused by: javax.jms.JMSException: Failed to initialise session factory
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1043)
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:790)
              at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:558)
              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:602)
              at org.hornetq.jms.client.HornetQConnectionFactory.createXAConnection(HornetQConnectionFactory.java:152)
              at org.hornetq.jms.client.HornetQConnectionFactory.createXAConnection(HornetQConnectionFactory.java:147)
              at org.hornetq.ra.HornetQRAManagedConnection.setup(HornetQRAManagedConnection.java:934)
              ... 67 more
      Caused by: HornetQException[errorCode=0 message=Failed to initialise session factory]
              ... 74 more
      Caused by: java.lang.IllegalStateException: The following keys are invalid for configuring a connector: port, host
              at org.hornetq.core.client.impl.FailoverManagerImpl.checkTransportKeys(FailoverManagerImpl.java:1052)
              at org.hornetq.core.client.impl.FailoverManagerImpl.<init>(FailoverManagerImpl.java:231)
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.initialise(ClientSessionFactoryImpl.java:237)
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1039)
              ... 73 more
      2010-07-30 02:03:50,901 ERROR [org.hornetq.ra.HornetQRASessionFactoryImpl] (WorkerThread#0[10.240.132.199:38339]) Could not create session
      javax.resource.ResourceException: Unable to get managed connection for JmsNonXA
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:381)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
              at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:837)
              at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:470)
              at com.getty.mms.mq.MQManagerBean.submitIndexRequest(MQManagerBean.java:36)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
              at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
              at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
              at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)

       

       

      Following is the code snippet,

       

      @Stateless
      @RemoteBinding(jndiBinding = "remote/MQManagerBean")
      public class MQManagerBean implements MQManager
      {
       @Resource(mappedName = "java:/JmsNonXA")
       private ConnectionFactory connectionFactory;
       public MQManagerBean()
       {
       }
      

       

      I have modified the jms-ds.xml as follows,

       

      <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:/DefauiltJMSProvider</config-property>
            <max-pool-size>20</max-pool-size>
         </no-tx-connection-factory>
      

       

      And the ra.xml is like this,

      <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.invm.InVMConnectorFactory</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=10.240.132.215;port=5445</config-property-value>
            </config-property>
      


      Server 10.240.132.213 is the one where I am looking up 10.240.132.215 from.

      Could anyone please tell me what is wrong?

       

      TIA,

      Joydeep

        • 1. Re: Problem with JmsNonXA
          wiktorowski maximilien Novice

          hi,

           

          in order to use invm connector you have to change the second part in ra.xml also

           

           

          <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.invm.InVMConnectorFactory</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=10.240.132.215;port=5445</config-property-value>
                </config-property>
          
          
          

           

          to

           

           

          <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.invm.InVMConnectorFactory</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>server-id=0</config-property-value>
                </config-property>
          
          
          

           

          Maximilien

          • 2. Re: Problem with JmsNonXA
            wiktorowski maximilien Novice

            reading more precisely your message and not just your error, you can't use invm connector if your client and server are not within the same jvm so use netty connector instead

             

             

                 <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=10.240.132.215;port=5445</config-property-value>
                 </config-property>
            
            
            
            • 3. Re: Problem with JmsNonXA
              Joydeep Sarkar Newbie

              ohh! Great point!

              Thats a really great observation.

              As I changed the connector type to Netty, it started qorking fine.

               

              I really appreciate your time and patience to read entire post.

               

              Regards,

              Joydeep