JMSException: Invalid transaction id
morgan Jul 16, 2003 3:14 PMHi,
I have an MDB that receives a message, does some stuff, and then
sends out a message. It's receiving the message fine, but when it
goes to send the new message an "Invalid transaction id" JMSException
is generated -- the stack trace is at the end of this message. I
searched the JBoss forums and didn't come across anything that helped,
and then I searched the "jboss-user" mailing list on SourceForge.
There I came across the thread Problem with MDB and CMT in
JBoss3.2RC2 (SSB and CMT works fine). Igor Fedorenko suggested
adding "@ejb:transaction type=Required" to the MDB's class comments
as a quick fix (I'm also using XDoclet). Well, this worked for me
(using jboss-3.2.2RC1_tomcat-4.1.24). Igor said that JBoss could
not match "transaction=Required" metadata specified for the "onMessage"
method. Being a novice I'm not 100% sure what's going on ... Does
his solution seem reasonable? Is this indictative of a problem
that still exists in JBoss (his post was from February 2003) and
should/will be fixed? Anyway, I'm just curious and trying to learn.
Thanks,
Paul
[pre]javax.jms.JMSException: Invalid transaction id.
at org.jboss.mq.SpyXAResourceManager.addMessage(SpyXAResourceManager.java:95)
at org.jboss.mq.SpySession.sendMessage(SpySession.java:695)
at org.jboss.mq.SpyQueueSender.internalSend(SpyQueueSender.java:118)
at org.jboss.mq.SpyQueueSender.send(SpyQueueSender.java:68)
at com.mv.worddance.ejb.WDBNotifierBean.notifyRecipient(WDBNotifierBean.java:255)
at com.mv.worddance.ejb.WDBNotifierBean.onMessage(WDBNotifierBean.java:164)
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:324)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:434)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:216)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:348)
at org.jboss.ejb.Container.invoke(Container.java:673)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:758)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1046)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:636)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:442)
at org.jboss.mq.SpySession.run(SpySession.java:294)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
at java.lang.Thread.run(Thread.java:536)[/pre]