ActiveMQ has problems enqueuing a message to AMQ store and raises a NullPointerException.

Solution Verified - Updated -

Issue

Broker has problems enqueuing a message to AMQ store and raises a NullPointerException.

NullPointerException in default AMQ persistence adapter when trying to enqueue a persistent message.

The ActiveMQ broker raises:

java.lang.NullPointerException
at org.apache.activemq.kaha.impl.index.hash.HashIndex.hash(HashIndex.java:598)
at org.apache.activemq.kaha.impl.index.hash.HashIndex.getBin(HashIndex.java:456)
at org.apache.activemq.kaha.impl.index.hash.HashIndex.get(HashIndex.java:294)
at org.apache.activemq.kaha.impl.container.MapContainerImpl.getEntry(MapContainerImpl.java:233)
at org.apache.activemq.store.kahadaptor.KahaReferenceStore.setBatch(KahaReferenceStore.java:253)
at org.apache.activemq.store.amq.AMQMessageStore.setBatch(AMQMessageStore.java:568)at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.setBatch(QueueStorePrefetch.java:78)
at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.addMessageLast(AbstractStoreCursor.java:163)
at org.apache.activemq.broker.region.cursors.StoreQueueCursor.addMessageLast(StoreQueueCursor.java:100)
at org.apache.activemq.broker.region.Queue.sendMessage(Queue.java:1206)
at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:523)
at org.apache.activemq.broker.region.Queue.send(Queue.java:466)
at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:354)
at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:438)
at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:133)
at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:455)
at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:639)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:308)
at org.apa.che.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:182)
at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:210)
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
at java.lang.Thread.run(Thread.java:595)

Environment

  • Fuse Message Broker 5.3 and lower

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content