[jboss-user] [JBoss Messaging] - BytesMessage javax.jms.MessageEOFException

rcarragher do-not-reply at jboss.com
Tue Oct 30 17:07:07 EDT 2007


Hi, I looked for similar problems on the forum, and couldn't find one.

I'm using JBoss AS 4.2.1 GA with JBoss Messaging 1.4.0, and the remoting patch.  I'm receiving a BytesMessage in an MDB, and the first time the message gets accessed (it's a simple readInt call) I get the following stack trace.  This does not occur on all messages, just some of them.  I have found no pattern.

anonymous wrote : Exception com.triversity.TriversityUnrecoverableException: JMSException caught while extracting the transactionware message.
  | 	at com.triversity.ExceptionLib.abort(ExceptionLib.java:64)
  | 	at com.triversity.tef.framework.awcmessagereceiver.MessageCrackerUtil.extractTransactionwareMessage(MessageCrackerUtil.java:119)
  | 	at com.triversity.tef.framework.awcmessagereceiver.GenericTransactionwareMessageCracker.getRequestParameters(GenericTransactionwareMessageCracker.java:57)
  | 	at com.triversity.tef.framework.awcmessagereceiver.MessageReceiverProcessing.getCrackedMessage(MessageReceiverProcessing.java:167)
  | 	at com.triversity.tef.framework.awcmessagereceiver.MessageReceiverProcessing.processMessage(MessageReceiverProcessing.java:139)
  | 	at com.triversity.tef.framework.awcmessagereceiver.ejb.AwcMessageReceiverBean.onMessage(AwcMessageReceiverBean.java:152)
  | 	at com.saptrv.te.ejb.PosMDB.onMessage(PosMDB.java:54)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
  | 	at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
  | 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
  | 	at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.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:138)
  | 	at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
  | 	at org.jboss.ejb.Container.invoke(Container.java:960)
  | 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
  | 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
  | 	at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
  | 	at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:157)
  | 	at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:801)
  | 	at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
  | 	at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
  | 	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
  | 	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
  | 	at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
  | 	at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
  | 	at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
  | 	at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
  | 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
  | 	at java.lang.Thread.run(Unknown Source)
  |  Trace of original exception: javax.jms.MessageEOFException: 
  | 	at org.jboss.jms.message.JBossBytesMessage.readInt(JBossBytesMessage.java:265)
  | 	at org.jboss.jms.message.BytesMessageProxy.readInt(BytesMessageProxy.java:128)
  | 	at com.triversity.tef.framework.awcmessagereceiver.MessageCrackerUtil.extractTransactionwareMessage(MessageCrackerUtil.java:106)
  | 	at com.triversity.tef.framework.awcmessagereceiver.GenericTransactionwareMessageCracker.getRequestParameters(GenericTransactionwareMessageCracker.java:57)
  | 	at com.triversity.tef.framework.awcmessagereceiver.MessageReceiverProcessing.getCrackedMessage(MessageReceiverProcessing.java:167)
  | 	at com.triversity.tef.framework.awcmessagereceiver.MessageReceiverProcessing.processMessage(MessageReceiverProcessing.java:139)
  | 	at com.triversity.tef.framework.awcmessagereceiver.ejb.AwcMessageReceiverBean.onMessage(AwcMessageReceiverBean.java:152)
  | 	at com.saptrv.te.ejb.PosMDB.onMessage(PosMDB.java:54)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
  | 	at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
  | 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
  | 	at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.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:138)
  | 	at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
  | 	at org.jboss.ejb.Container.invoke(Container.java:960)
  | 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
  | 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
  | 	at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
  | 	at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:157)
  | 	at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:801)
  | 	at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
  | 	at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
  | 	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
  | 	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
  | 	at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
  | 	at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
  | 	at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
  | 	at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
  | 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
  | 	at java.lang.Thread.run(Unknown Source)

I've done some analysis, and it seems that when trying to read a BytesMessage, the JBossBytesMessage implementation uses an internal ByteArrayInputStream and DataInputStream.  When I run the code and it fails, through a debugger, I can see that the bais is properly populated, but the dis is out of synch with it (it's full of 0's - nulls).  When the code succeeds, both the bais and dis are null, and get properly populated through the checkRead() method.

I'm at a complete loss.  Is this a bug in my code (very possible) or something in the messaging code?  Thanks in advance,
Rick

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100442#4100442

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100442



More information about the jboss-user mailing list