2 Replies Latest reply on Apr 30, 2004 5:05 AM by Kevin Daly

    Error Removing JMS Messages

    Kevin Daly Newbie

      Hi,

      We are encountering a problem with the PersistenceManager when it is trying to delete messages. We are running with JBoss 3.2.1. Included are two stack traces, the first one showing the exception appearing in the JBoss logs, the second exception is the error being thrown by the message consumer. As you can see the message consumer is being shut down.

      We have experienced other problems with the Persistence Manager as described in.

      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48851

      the solution for which is to upgrade to JBoss 3.2.3.

      Does anyone know whether there is a known bug in 3.2.1 to do with the removal of messages that has been fixed in a subsequent release.

      Note at the time of the error the system was not under heavy load.

      - Kevin.

      2004-04-28 21:40:48,428 ERROR [org.jboss.mq.il.uil2.SocketManager] Failed to handle: org.jboss.mq.il.uil2.msgs.AcknowledgementRequestMsg634813[msgType: m_acknowledge, msgID: 8156, error: null]
      org.jboss.mq.SpyJMSException: Could not delete the message from the database: delete affected 0 rows
      at org.jboss.mq.pm.jdbc2.PersistenceManager.remove(PersistenceManager.java:919)
      at org.jboss.mq.server.BasicQueue.acknowledge(BasicQueue.java:382)
      at org.jboss.mq.server.JMSTopic.acknowledge(JMSTopic.java:264)
      at org.jboss.mq.server.ClientConsumer.acknowledge(ClientConsumer.java:328)
      at org.jboss.mq.server.JMSDestinationManager.acknowledge(JMSDestinationManager.java:529)
      at org.jboss.mq.server.JMSDestinationManager.acknowledge(JMSDestinationManager.java:513)
      at org.jboss.mq.server.JMSServerInterceptorSupport.acknowledge(JMSServerInterceptorSupport.java:197)
      at org.jboss.mq.server.TracingInterceptor.acknowledge(TracingInterceptor.java:405)
      at org.jboss.mq.server.JMSServerInvoker.acknowledge(JMSServerInvoker.java:199)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:81)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:355)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
      at java.lang.Thread.run(Thread.java:536)


      [MessageListenerThread - GPRS] WARN org.jboss.util.NestedThrowable - Duplicate throwable nesting of same base type: class org.jboss.mq.SpyJMSException is assignable from: class org.jboss.mq.SpyJMSException
      [MessageListenerThread - GPRS] WARN org.jboss.mq.SpyMessageConsumer - Message consumer closing due to error in listening thread.
      org.jboss.mq.SpyJMSException: Cannot acknowlege a message; - nested throwable: (org.jboss.mq.SpyJMSException: Could not delete the message from the database: delete affected 0 rows)
      at org.jboss.mq.Connection.send(Connection.java:907)
      at org.jboss.mq.SpySession.doAcknowledge(SpySession.java:603)
      at org.jboss.mq.SpyMessage.doAcknowledge(SpyMessage.java:544)
      at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:567)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: org.jboss.mq.SpyJMSException: Could not delete the message from the database: delete affected 0 rows
      at org.jboss.mq.pm.jdbc2.PersistenceManager.remove(PersistenceManager.java:919)
      at org.jboss.mq.server.BasicQueue.acknowledge(BasicQueue.java:382)
      at org.jboss.mq.server.JMSTopic.acknowledge(JMSTopic.java:264)
      at org.jboss.mq.server.ClientConsumer.acknowledge(ClientConsumer.java:328)
      at org.jboss.mq.server.JMSDestinationManager.acknowledge(JMSDestinationManager.java:529)
      at org.jboss.mq.server.JMSDestinationManager.acknowledge(JMSDestinationManager.java:513)
      at org.jboss.mq.server.JMSServerInterceptorSupport.acknowledge(JMSServerInterceptorSupport.java:197)
      at org.jboss.mq.server.TracingInterceptor.acknowledge(TracingInterceptor.java:405)
      at org.jboss.mq.server.JMSServerInvoker.acknowledge(JMSServerInvoker.java:199)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:81)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:355)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
      ... 1 more

        • 1. Re: Error Removing JMS Messages
          Elias Ross Master


          What is you DB you are using for persistence?

          The important message is this:

          org.jboss.mq.SpyJMSException: Could not delete the message from the database: delete affected 0 rows

          It could be that the message was already removed or never inserted in the first place. It could also be that the JDBC drivers aren't returning the number of rows deleted. Do you share the DB with another JBoss instance?

          • 2. Re: Error Removing JMS Messages
            Kevin Daly Newbie

            We are a using a SQL Server 2000 Database for message persistence.
            The database is not being shared by other JBoss instances.

            Due to the issue:

            http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48851

            we are manually deleting left over temporary messages prior to
            restarting JBoss. This is an interim measure before we upgrade to
            JBoss 3.2.3. We are seeing the exception 3-4 hours after the restart.

            Some further info:

            We have JBoss 3.2.1 running on a Windows 2000 Server, using JDK 1.4.

            Regards,

            Kevin.