[ https://issues.apache.org/jira/browse/AMQ-5665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15258320#comment-15258320 ]
Timothy Bish commented on AMQ-5665: ----------------------------------- Try the latest release (5.13.2) and write a test case that reproduces if you see it there. > memory store is broken in 5.11.0 for advisories (and probably other issues as > well) > ----------------------------------------------------------------------------------- > > Key: AMQ-5665 > URL: https://issues.apache.org/jira/browse/AMQ-5665 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.11.0 > Reporter: Kevin Burton > Assignee: Dejan Bosanac > Fix For: 5.12.0 > > > We're running 5.10.2 and don't encounter this issue. We're running a > non-persistent broker in production and testing so that's why we found this > issue. > It looks like 5.11.0 introduced this issue. > Essentially Advisories fail to fire. > It looks like it’s a bug with MemoryTransactionStore. Switching to persistent > brokers fixes the problem. > It’s because addMessage calls: > } else { > destination.addMessage(null, message); > } > .. with an explicit null. > the message given is: > 2015-03-16 12:54:17,538 WARN [ActiveMQ Transport: > tcp:///127.0.0.1:56468@16161] org.apache.activemq.advisory.AdvisoryBroker > Failed to fire delivered advisory, reason: java.lang.NullPointerException > … and I saw this when I was running mvn test in the main ActiveMQ test suite > (or at least pretty sure I did) so this is happening not just in my code. > The full exception , which I captured by setting a break point is below. > java.lang.NullPointerException > at > org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:626) > at > org.apache.activemq.advisory.AdvisoryBroker.messageDelivered(AdvisoryBroker.java:397) > at > org.apache.activemq.broker.BrokerFilter.messageDelivered(BrokerFilter.java:349) > at > org.apache.activemq.broker.BrokerFilter.messageDelivered(BrokerFilter.java:349) > at > org.apache.activemq.broker.MutableBrokerFilter.messageDelivered(MutableBrokerFilter.java:360) > at > org.apache.activemq.broker.MutableBrokerFilter.messageDelivered(MutableBrokerFilter.java:360) > at > org.apache.activemq.broker.region.BaseDestination.messageDelivered(BaseDestination.java:518) > at org.apache.activemq.broker.region.Queue.messageSent(Queue.java:1806) > at > org.apache.activemq.broker.region.Queue.doPendingCursorAdditions(Queue.java:794) > at > org.apache.activemq.broker.region.Queue.orderedCursorAdd(Queue.java:875) > at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:854) > at org.apache.activemq.broker.region.Queue.send(Queue.java:733) > at > org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:419) > at > org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:468) > at > org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:297) > at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:152) > at > org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96) > at > org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:307) > at > org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:157) > at > org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:157) > at > org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:541) > at > org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:768) > at > org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:334) > at > org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188) > at > org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) > at > org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) > at > org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270) > at > org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) > at > org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214) > at > org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196) > at java.lang.Thread.run(Thread.java:724) > ... the core issue here looks like the message doesn't have a TransactionId > and MemoryTransactionStore has an addMessages which has a fall through of > addMessage with a null context which then causes the NPE. > Did messages have an implicit transaction Id before? -- This message was sent by Atlassian JIRA (v6.3.4#6332)