NPE exception in kahadb after index issue

Solution Verified - Updated -

Environment

  • Fuse Message Broker

    • 5.5

Issue

  • On a broker running activemq-5.5.1-fuse-09-16, we see NPE immediately after warnings related to duplicate messages.

For instance:

2013-04-23 13:21:19,106 [ActiveMQ Broker[activemq_xxxx.xxxx.xxx]] Scheduler] WARN MessageDatabase - Duplicate message add attempt rejected. Destination: ActiveMQ.DLQ, Message id: ID:xxxx.xxxx.xxx-23021-1358349534652-2:27274428:-1:1:1865
2013-04-23 13:21:19,690 [ActiveMQ Broker[activemq_xxxx.xxxx.xxx] Scheduler] ERROR Queue - Problem retrieving message for browse
java.lang.NullPointerException

2013-04-23 13:44:49,467 [ActiveMQ Broker[activemq_] Scheduler] WARN MessageDatabase - Duplicate message add attempt rejected. Destination: ActiveMQ.DLQ, Message id: ID:xxxx.xxxx.xxx-23021-1358349534652-2:27271289:-1:1:3615
2013-04-23 13:44:49,771 [ActiveMQ Broker[activemq_xxxx.xxxx.xxx] Scheduler] ERROR Queue - Problem retrieving message for browse
java.lang.NullPointerException

and

2013-04-21 09:20:36,429 [ActiveMQ Broker[activemq_xxxx.xxxx.xxx] Scheduler] WARN MessageDatabase - Duplicate message add attempt rejected. Destination: ActiveMQ.DLQ, Message id: ID:xxxx.xxxx.xxx-1358349534652-2:27274429:-1:1:1058
2013-04-21 09:20:36,463 [ActiveMQ Broker[activemq_xxxx.xxxx.xxx] Scheduler] ERROR Queue - Problem retrieving message for browse
java.lang.NullPointerException
    at org.apache.kahadb.index.ListNode.access$200(ListNode.java:37)
    at org.apache.kahadb.index.ListNode$NodeMarshaller.writePayload(ListNode.java:265)
    at org.apache.kahadb.index.ListNode$NodeMarshaller.writePayload(ListNode.java:255)
    at org.apache.kahadb.page.Transaction.store(Transaction.java:248)
    at org.apache.kahadb.index.ListIndex.storeNode(ListIndex.java:326)
    at org.apache.kahadb.index.ListNode.store(ListNode.java:332)
    at org.apache.kahadb.index.ListNode.access$500(ListNode.java:37)
    at org.apache.kahadb.index.ListNode$ListIterator.remove(ListNode.java:227)
    at org.apache.activemq.store.kahadb.plist.PList$PListIterator$1.execute(PList.java:229)
    at org.apache.kahadb.page.Transaction.execute(Transaction.java:771)
    at org.apache.activemq.store.kahadb.plist.PList$PListIterator.remove(PList.java:226)
    at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor$DiskIterator.remove(FilePendingMessageCursor.java:517)
    at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.remove(FilePendingMessageCursor.java:321)
    at org.apache.activemq.broker.region.Queue.doBrowse(Queue.java:1055)
    at org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:812)
    at org.apache.activemq.broker.region.Queue.access$100(Queue.java:91)
    at org.apache.activemq.broker.region.Queue$2.run(Queue.java:131)
    at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

Resolution

  • Bug MB-1199 fixes this issue
  • This is fixed in 5.5.1-fuse-10-16

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments