Hi,

Intermittently, we get a NullPointerException while sending a message out
and not sure what's causing it.

Caused by: java.lang.NullPointerException
        at
org.apache.activemq.store.amq.AMQMessageStore.addMessage(AMQMessageStore.java:129)
        at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:440)
        at org.apache.activemq.broker.region.Queue$6.run(Queue.java:362)
        at org.apache.activemq.broker.region.Queue.iterate(Queue.java:1020)
        at
org.apache.activemq.thread.DeterministicTaskRunner.runTask(DeterministicTaskRunner.java:84)
        at
org.apache.activemq.thread.DeterministicTaskRunner$1.run(DeterministicTaskRunner.java:41)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)


    public final void addMessage(ConnectionContext context, final Message
message) throws IOException {
        final MessageId id = message.getMessageId();
        final Location location = peristenceAdapter.writeCommand(message,
message.isResponseRequired());
        if (!context.isInTransaction()) {
....
            transactionStore.addMessage(this, message, location);
            context.getTransaction().addSynchronization(new
Synchronization() {  <<<<<<<<<<< NPE here

Not sure how it can get NPE since context and transactions are deferenced in
prior lines, unless transaction is set to null by another thread (not sure
if that's possible)

I know we have some network issues that cause to drop connection.  We have
failover in place in connection pool.  There were no indication of abnormal
connection issues around the time the exception occurred.

Any idea what's going on?

Thanks

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-in-AMQMessageStore.addMessage-in-AMQ-5.2-tp23438691p23438691.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to