9 Replies Latest reply on Oct 30, 2006 11:16 AM by Jörg von Frantzius

    [4.0.3SP1] NPE in BasicQueue.setupMessageAcknowledgement(Bas

    Jörg von Frantzius Newbie

      Hi,

      after having received a couple of thousand messages, we saw this exception in our logs (using JBOSS 4.0.3SP1):

      2006-10-24 18:53:24,187 ERROR [UIL2(SocketManager.MsgPool@a52a72a client=192.168.100.214:53381)#4 SocketManager] Failed to handle: org.jboss.mq.il.uil2.msgs.ReceiveMsg2084258688[msgType: m_receive, msgID: -2147361440, error: null]
      java.lang.NullPointerException
      at org.jboss.mq.server.BasicQueue.setupMessageAcknowledgement(BasicQueue.java:945)
      at org.jboss.mq.server.BasicQueue.receive(BasicQueue.java:516)
      at org.jboss.mq.server.JMSTopic.receive(JMSTopic.java:320)
      at org.jboss.mq.server.ClientConsumer.receive(ClientConsumer.java:222)
      at org.jboss.mq.server.JMSDestinationManager.receive(JMSDestinationManager.java:656)
      at org.jboss.mq.server.JMSServerInvoker.receive(JMSServerInvoker.java:226)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:155)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:595)
      2006-10-24 18:53:24,251 WARN [Connection Consumer for dest Subscription[subId=-2147483648connection=ConnectionToken:ID:23/null destination=TOPIC.sgw/MOCacheInvalidationTopic messageSelector=null Local Create] id=12 SpyConnectionConsumer] Connection consumer closing due to error in listening thread SpyConnectionConsumer[sub=Subscription[subId=-2147483648connection=ConnectionToken:ID:23/null destination=TOPIC.sgw/MOCacheInvalidationTopic messageSelector=null Local Create] messages=0 waitingForMessage=false internalThread=Thread[Connection Consumer for dest Subscription[subId=-2147483648connection=ConnectionToken:ID:23/null destination=TOPIC.sgw/MOCacheInvalidationTopic messageSelector=null Local Create] id=12,5,jboss] sessionPool=org.jboss.jms.asf.StdServerSessionPool@6c6fff7a connection=Connection@753785396[token=ConnectionToken:ID:23/null rcvstate=STARTED]]
      org.jboss.mq.SpyJMSException: Cannot receive ; - nested throwable: (java.lang.NullPointerException)
      at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:66)
      at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:51)
      at org.jboss.mq.Connection.receive(Connection.java:916)
      at org.jboss.mq.SpyConnectionConsumer.run(SpyConnectionConsumer.java:238)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
      at org.jboss.mq.server.BasicQueue.setupMessageAcknowledgement(BasicQueue.java:945)
      at org.jboss.mq.server.BasicQueue.receive(BasicQueue.java:516)
      at org.jboss.mq.server.JMSTopic.receive(JMSTopic.java:320)
      at org.jboss.mq.server.ClientConsumer.receive(ClientConsumer.java:222)
      at org.jboss.mq.server.JMSDestinationManager.receive(JMSDestinationManager.java:656)
      at org.jboss.mq.server.JMSServerInvoker.receive(JMSServerInvoker.java:226)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:155)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      ... 1 more

      We have two durable subscriptions on that topic, and one of them (the respective MDB) does not seem to receive any onMethod() calls anymore afterwards.

      It seems that MessageReference.getMessage() returns null for some reason. Do you JBOSS people have any idea how this can happen? Maybe in our code we can somehow prevent this from happening?

      Regards,
      Jörg