Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 12575 invoked from network); 30 Jun 2008 15:32:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jun 2008 15:32:51 -0000 Received: (qmail 11174 invoked by uid 500); 30 Jun 2008 15:32:52 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 10991 invoked by uid 500); 30 Jun 2008 15:32:52 -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 10980 invoked by uid 99); 30 Jun 2008 15:32:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 08:32:52 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 15:32:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4CDAF234C148 for ; Mon, 30 Jun 2008 08:32:00 -0700 (PDT) Message-ID: <1796454074.1214839920310.JavaMail.jira@brutus> Date: Mon, 30 Jun 2008 08:32:00 -0700 (PDT) From: "Joel Turkel (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-1831) Message.getStringProperty("JMSXProducerTXID") throws java.lang.NumberFormatException MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Message.getStringProperty("JMSXProducerTXID") throws java.lang.NumberFormatException ------------------------------------------------------------------------------------ Key: AMQ-1831 URL: https://issues.apache.org/activemq/browse/AMQ-1831 Project: ActiveMQ Issue Type: Bug Affects Versions: 5.1.0 Environment: Windows XP SP2 Reporter: Joel Turkel A java.lang.NumberFormatException is thrown when attempting to retrieve the JMSXProducerTXID from a message. The stack trace is: Exception in thread "main" java.lang.NumberFormatException: For input string: "TX:ID:JTURKEL-690-4629-1214839585805-0:0:1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:447) at java.lang.Integer.(Integer.java:620) at org.apache.activemq.filter.PropertyExpression$14.evaluate(PropertyExpression.java:147) at org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:194) at org.apache.activemq.command.ActiveMQMessage.getObjectProperty(ActiveMQMessage.java:447) at org.apache.activemq.command.ActiveMQMessage.getStringProperty(ActiveMQMessage.java:535) at com.queue.test.MQTest.testBug(MQTest.java:41) at com.queue.test.ActiveMQTest.main(ActiveMQTest.java:21) Here is some simple test code to reproduce the problem: ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_USER, ActiveMQConnection.DEFAULT_PASSWORD, ActiveMQConnection.DEFAULT_BROKER_URL) Connection connection = connectionFactory.createConnection(); connection.start(); Session producerSession = connection.createSession(true, Session.SESSION_TRANSACTED); MessageProducer producer = producerSession.createProducer(producerSession.createQueue("myQueue")); TextMessage producerMessage = producerSession.createTextMessage("Test Message"); producer.send(producerMessage); producer.close(); producerSession.commit(); producerSession.close(); Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED); MessageConsumer consumer = consumerSession.createConsumer(consumerSession.createQueue("myQueue")); Message consumerMessage = consumer.receive(1000); System.out.println(consumerMessage.getStringProperty("JMSXProducerTXID")); consumer.close(); consumerSession.commit(); consumerSession.close(); connection.close(); This problem is quite severe for us since we need the transaction id property and would like to certify against ActiveMQ. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.