Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 050146052 for ; Thu, 16 Jun 2011 14:52:09 +0000 (UTC) Received: (qmail 39521 invoked by uid 500); 16 Jun 2011 14:52:08 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 39478 invoked by uid 500); 16 Jun 2011 14:52:08 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 39412 invoked by uid 99); 16 Jun 2011 14:52:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:52:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:52:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 67DBC41BFE9 for ; Thu, 16 Jun 2011 14:51:47 +0000 (UTC) Date: Thu, 16 Jun 2011 14:51:47 +0000 (UTC) From: "Ivan Pechorin (JIRA)" To: dev@activemq.apache.org Message-ID: <1673467777.11150.1308235907422.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <103066679.11147.1308235907320.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AMQ-3369) occasionally NPE in ActiveMQTextMessage.getSize() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ivan Pechorin updated AMQ-3369: ------------------------------- Description: Sometime we get NullPointerException when sending a text message. We use method send(destination, message) of interface javax.jms.MessageProducer. java.lang.NullPointerException at org.apache.activemq.command.ActiveMQTextMessage.getSize(ActiveMQTextMessage.java:148) at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1753) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300) Caller code is: try { final TextMessage message = session.createTextMessage(msg); message.setJMSType(type); message.setJMSReplyTo(destination); message.setJMSCorrelationID(jmsMessageId); 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? was: Sometime we get NullPointerException when sending a text message. We use method send(destination, message) of interface javax.jms.MessageProducer. java.lang.NullPointerException at org.apache.activemq.command.ActiveMQTextMessage.getSize(ActiveMQTextMessage.java:148) at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1753) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300) Relevant code snippet is: try { final TextMessage message = session.createTextMessage(msg); message.setJMSType(type); message.setJMSReplyTo(destination); message.setJMSCorrelationID(jmsMessageId); 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? > occasionally NPE in ActiveMQTextMessage.getSize() > ------------------------------------------------- > > Key: AMQ-3369 > URL: https://issues.apache.org/jira/browse/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. > java.lang.NullPointerException > at org.apache.activemq.command.ActiveMQTextMessage.getSize(ActiveMQTextMessage.java:148) > at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1753) > at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) > at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300) > Caller code is: > try { > final TextMessage message = session.createTextMessage(msg); > message.setJMSType(type); > message.setJMSReplyTo(destination); > message.setJMSCorrelationID(jmsMessageId); > 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: http://www.atlassian.com/software/jira