activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Co <...@exist.com>
Subject Re: TransactionRolledbackLocalException in method
Date Mon, 22 Jan 2007 08:34:25 GMT
Are you sure that the object you serialized in the ObjectMessage is of 
type MonitorMSG?

miniman wrote:
> Here is the stack trace.
>
> 07:36:21,320 INFO  [PublishMsgToTopic] TestMDB MDB.
> 07:36:21,335 INFO  [PublishMsgToTopic] TestMDB.setMessageDrivenContext
> 07:36:21,351 INFO  [PublishMsgToTopic] TestMDB.ejbCreate
> 07:36:21,367 INFO  [PublishMsgToTopic] TestMDB.onMessage
> 07:36:21,398 INFO  [PublishMsgToTopic] TestMDB.ejbRemove
> 07:36:21,414 ERROR [LogInterceptor] TransactionRolledbackLocalException in
> method: public abstract v
> oid javax.jms.MessageListener.onMessage(javax.jms.Message), causedBy:
> java.lang.ClassCastException: java.lang.String
>         at com.db.abmonitor.mdb.TestMDB.handleMessage(TestMDB.java:67)
>         at com.db.abmonitor.mdb.TestMDB.onMessage(TestMDB.java:38)
>         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:585)
>         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
>         at
> org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j
> ava:495)
>         at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
> nterceptor.java:158)
>         at
> org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc
> eptor.java:116)
>         at
> org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
>
>         at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
>         at
> org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
>         at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
>         at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
> java:136)
>         at
> org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
>         at org.jboss.ejb.Container.invoke(Container.java:954)
>         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:585)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>         at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>         at
> org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
>         at
> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
>         at
> org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
>         at
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
>         at
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointIntercept
> or.java:263)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:140)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.onMessage(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpoin
> tProxy.java:121)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:693)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:164)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> 07:36:22,554 ERROR [ActiveMQSession] error dispatching message:
> javax.ejb.TransactionRolledbackLocalException: java.lang.String
>         at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
>         at
> org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
>         at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
>         at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
> java:136)
>         at
> org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
>         at org.jboss.ejb.Container.invoke(Container.java:954)
>         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:585)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>         at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>         at
> org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
>         at
> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
>         at
> org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
>         at
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
>         at
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointIntercept
> or.java:263)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:140)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.onMessage(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpoin
> tProxy.java:121)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:693)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:164)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassCastException: java.lang.String
>         at com.db.abmonitor.mdb.TestMDB.handleMessage(TestMDB.java:67)
>         at com.db.abmonitor.mdb.TestMDB.onMessage(TestMDB.java:38)
>         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:585)
>         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
>         at
> org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j
> ava:495)
>         at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
> nterceptor.java:158)
>         at
> org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc
> eptor.java:116)
>         at
> org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
>
>         at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
>         ... 34 more
> 07:36:23,726 INFO  [ServerSessionImpl:0] Endpoint failed to process message.
> Reason: java.lang.NullP
> ointerException
> 07:36:23,773 WARN  [TransactionImpl] XAException:
> tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=
> dblonws19800/14, BranchQual=, localId=14] errorCode=XAER_RMFAIL
> javax.transaction.xa.XAException: The connection is already closed
>         at
> org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:592)
>         at
> org.apache.activemq.TransactionContext.setXid(TransactionContext.java:555)
>         at
> org.apache.activemq.TransactionContext.end(TransactionContext.java:338)
>         at
> org.apache.activemq.ra.LocalAndXATransaction.end(LocalAndXATransaction.java:90)
>         at
> org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2143)
>         at
> org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2118)
>         at
> org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1462)
>         at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:411)
>         at org.jboss.tm.TxManager.rollback(TxManager.java:364)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.endTransaction(MessageEndpointInt
> erceptor.java:430)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.finish(MessageEndpointInterceptor
> .java:308)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.release(MessageEndpointIntercepto
> r.java:166)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:126)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.release(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProx
> y.java:141)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpoi
> ntProxy.java:99)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointP
> roxy.java:134)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:69)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:251)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:18
> 1)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:178)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.activemq.ConnectionClosedException: The connection is
> already closed
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1111)
>         at
> org.apache.activemq.TransactionContext.setXid(TransactionContext.java:551)
>         ... 25 more
> 07:36:24,617 WARN  [TransactionImpl] XAException:
> tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=
> dblonws19800/14, BranchQual=, localId=14] errorCode=XAER_RMFAIL
> javax.transaction.xa.XAException: The connection is already closed
>         at
> org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:592)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java:415)
>         at
> org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:127)
>         at
> org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2277)
>         at
> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1837)
>         at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:412)
>         at org.jboss.tm.TxManager.rollback(TxManager.java:364)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.endTransaction(MessageEndpointInt
> erceptor.java:430)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.finish(MessageEndpointInterceptor
> .java:308)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.release(MessageEndpointIntercepto
> r.java:166)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:126)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.release(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProx
> y.java:141)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpoi
> ntProxy.java:99)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointP
> roxy.java:134)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:69)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:251)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:18
> 1)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:178)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.activemq.ConnectionClosedException: The connection is
> already closed
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1111)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java:404)
>         ... 23 more
> 07:36:25,429 INFO  [PublishMsgToTopic] TestMDB MDB.
> 07:36:25,429 INFO  [PublishMsgToTopic] TestMDB.setMessageDrivenContext
> 07:36:25,445 INFO  [PublishMsgToTopic] TestMDB.ejbCreate
> 07:36:25,476 INFO  [PublishMsgToTopic] TestMDB.onMessage
> 07:36:25,492 INFO  [PublishMsgToTopic] TestMDB.ejbRemove
> 07:36:25,507 ERROR [LogInterceptor] TransactionRolledbackLocalException in
> method: public abstract v
> oid javax.jms.MessageListener.onMessage(javax.jms.Message), causedBy:
> java.lang.ClassCastException: java.lang.String
>         at com.db.abmonitor.mdb.TestMDB.handleMessage(TestMDB.java:67)
>         at com.db.abmonitor.mdb.TestMDB.onMessage(TestMDB.java:38)
>         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:585)
>         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
>         at
> org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j
> ava:495)
>         at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
> nterceptor.java:158)
>         at
> org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc
> eptor.java:116)
>         at
> org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
>
>         at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
>         at
> org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
>         at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
>         at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
> java:136)
>         at
> org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
>         at org.jboss.ejb.Container.invoke(Container.java:954)
>         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:585)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>         at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>         at
> org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
>         at
> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
>         at
> org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
>         at
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
>         at
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointIntercept
> or.java:263)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:140)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.onMessage(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpoin
> tProxy.java:121)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:693)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:164)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> 07:36:26,648 ERROR [ActiveMQSession] error dispatching message:
> javax.ejb.TransactionRolledbackLocalException: java.lang.String
>         at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
>         at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
>         at
> org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
>         at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
>         at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
> java:136)
>         at
> org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
>         at org.jboss.ejb.Container.invoke(Container.java:954)
>         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:585)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>         at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>         at
> org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
>         at
> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
>         at
> org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
>         at
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
>         at
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointIntercept
> or.java:263)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:140)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.onMessage(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpoin
> tProxy.java:121)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:693)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:164)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassCastException: java.lang.String
>         at com.db.abmonitor.mdb.TestMDB.handleMessage(TestMDB.java:67)
>         at com.db.abmonitor.mdb.TestMDB.onMessage(TestMDB.java:38)
>         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:585)
>         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
>         at
> org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j
> ava:495)
>         at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
> nterceptor.java:158)
>         at
> org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc
> eptor.java:116)
>         at
> org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
>
>         at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
>         ... 34 more
> 07:36:27,836 INFO  [ServerSessionImpl:1] Endpoint failed to process message.
> Reason: java.lang.Runti
> meException: Endpoint after delivery notification failure
> 07:36:27,867 WARN  [TransactionImpl] XAException:
> tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=
> dblonws19800/15, BranchQual=, localId=15] errorCode=XAER_RMFAIL
> javax.transaction.xa.XAException: The transport
> tcp://localhost/127.0.0.1:61616 of type: org.apache.
> activemq.transport.tcp.TcpTransport is not running.
>         at
> org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:592)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java:415)
>         at
> org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:127)
>         at
> org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2277)
>         at
> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1837)
>         at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:412)
>         at org.jboss.tm.TxManager.rollback(TxManager.java:364)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.endTransaction(MessageEndpointInt
> erceptor.java:430)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.finish(MessageEndpointInterceptor
> .java:308)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.release(MessageEndpointIntercepto
> r.java:166)
>         at
> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor
> .java:126)
>         at
> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>         at $Proxy59.release(Unknown Source)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProx
> y.java:141)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpoi
> ntProxy.java:99)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointP
> roxy.java:134)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:69)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:251)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:18
> 1)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:178)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at
> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.jms.JMSException: The transport
> tcp://localhost/127.0.0.1:61616 of type: org.apache
> .activemq.transport.tcp.TcpTransport is not running.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1125)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java:404)
>         ... 23 more
> Caused by: java.io.IOException: The transport
> tcp://localhost/127.0.0.1:61616 of type: org.apache.ac
> tivemq.transport.tcp.TcpTransport is not running.
>         at
> org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:109)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:117)
>         at
> org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:142)
>         at
> org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:82)
>         at
> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:87)
>         at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:45)
>         at
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:67)
>
>         at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:72)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1115)
>         ... 24 more
>
>
>
> Adrian Co wrote:
>   
>> Please add the complete stack trace.
>>
>> miniman wrote:
>>     
>>> All when i send a message from my MDB i get this error come up.
>>>
>>> = true, text = null}
>>> 16:50:24,949 INFO  [PublishMsgToTopic] Autobahn Monitor.onMessage
>>> 16:50:27,965 INFO  [PublishMsgToTopic] Autobahn Monitor.ejbRemove
>>> 16:50:27,981 ERROR [LogInterceptor] TransactionRolledbackLocalException
>>> in
>>> method: public abstract v
>>> oid javax.jms.MessageListener.onMessage(javax.jms.Message), causedBy:
>>> java.lang.ClassCastException: java.lang.String
>>>
>>> my main code is
>>>
>>> 	public void onMessage(Message message)  {
>>> 		if (logger.isInfoEnabled()) {
>>> 			logger.info("Autobahn Monitor.onMessage");
>>> 		}
>>> 		
>>>
>>> 			handleMessage(message);
>>>
>>> 		
>>> 	}
>>> 	private void handleMessage(Message message) {
>>> 		try {
>>> 			if (message instanceof ObjectMessage) {
>>> 				//TextMessage textMessage = (TextMessage) message;
>>> 				ObjectMessage objMsg = (ObjectMessage)message;
>>> 				eventMsg = (MonitorMSG)objMsg.getObject();
>>> 				if (logger.isInfoEnabled()) {
>>> 					logger.info("Message received: " + eventMsg.getHostname());
>>> 				}
>>> 				send(objMsg);
>>> 			} else {
>>> 				if (logger.isInfoEnabled()) {
>>> 					logger.info("Unknown message type received: " + message.toString());
>>> 				}
>>> 				//send("Unknown message type: " + message.toString());
>>> 			}
>>> 		} catch (JMSException e) {
>>> 			// TODO Auto-generated catch block
>>> 			e.printStackTrace();
>>> 		}
>>> 	}
>>> 	
>>> 	private void send(ObjectMessage obj) {
>>> 		sendToEJB(obj);
>>> 	}
>>> 	
>>> 	private void sendToEJB(ObjectMessage obj)  {
>>> 		PublishToTopic publishtoTopic = new PublishToTopic();
>>> 		publishtoTopic.sendMessage(obj);
>>> 	} 
>>>
>>>
>>> Then in the PublishtoTopic class
>>>
>>>
>>> 	public void sendMessage(ObjectMessage obj){
>>> 		try {
>>> 			ObjectMessage objMsg = (ObjectMessage)obj;
>>> 			//eventMSG = (MonitorMSG)objMsg.getObject();
>>> 			ActiveMQConnectionFactory factory = new
>>> ActiveMQConnectionFactory(url);
>>> 			connection = factory.createConnection();    	
>>> 			session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
>>> 			topic = session.createTopic("TOOL.TOPICTEST");
>>> 			//control = session.createTopic("topictest.control");
>>> 			
>>> 			publisher = session.createProducer(topic);
>>> 			publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
>>> 			
>>> 			//session.createConsumer(control).setMessageListener(this);
>>> 			connection.start();
>>>
>>> 			//request shutdown
>>> 			publisher.send(objMsg);
>>>
>>> 			connection.stop();
>>> 			connection.close();
>>> 		} catch (JMSException e) {
>>> 			// TODO Auto-generated catch block
>>> 			e.printStackTrace();
>>> 		}    
>>> 	}
>>>
>>> Am i missing something......
>>>
>>>
>>>
>>>
>>>   
>>>       
>>
>>     
>
>   


Mime
View raw message