activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Pechorin (JIRA)" <>
Subject [jira] [Created] (AMQ-3369) occasionally NPE in ActiveMQTextMessage.getSize()
Date Thu, 16 Jun 2011 14:51:47 GMT
occasionally NPE in ActiveMQTextMessage.getSize()

                 Key: AMQ-3369
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.1
         Environment: JDK 1.6 (64-bit), Windows Server 2008 x64
            Reporter: Ivan Pechorin

Sometime we get NullPointerException when sending a text message. We use method send(destination,
message) of interface javax.jms.MessageProducer.

 at org.apache.activemq.command.ActiveMQTextMessage.getSize(
 at org.apache.activemq.ActiveMQSession.send(
 at org.apache.activemq.ActiveMQMessageProducer.send(
 at org.apache.activemq.ActiveMQMessageProducerSupport.send(

Relevant code snippet is:

try {
    final TextMessage message = session.createTextMessage(msg);
    producer.send(destination, message);
} catch (JMSException ex) {

I.e. we don't reuse or store the message being sent.

We are also 100% sure that both session and its producer are used from one thread only at
any point of time (we have use a custom session pool).

Broker URI is vm://jboss-activemq-broker?jms.copyMessageOnSend=false&jms.objectMessageSerializationDefered=true&jms.useAsyncSend=true

The NPE occurs occasionally, we were not able to reproduce it deterministically so far.

Any suggestions on how to investigate this?

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message