Bug 612526 - NullPointerException thrown when you pass an address based destination to the setJMSReplyTo() in a Message.
Summary: NullPointerException thrown when you pass an address based destination to the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: Development
Hardware: All
OS: Linux
high
high
Target Milestone: 1.3
: ---
Assignee: Rajith Attapattu
QA Contact: Jeff Needle
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-08 13:06 UTC by Rajith Attapattu
Modified: 2010-10-20 13:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rajith Attapattu 2010-07-08 13:06:14 UTC
Description of problem:
When you pass a destination which was not used in consumer / producer (even when the address was the same, only the object was different), a NullPointerException is thrown, because the getExchangeName and getRoutingKey methods from AMQDestination returns null. This is due to a address not being evaluated properly and the details not being extracted.

Version-Release number of selected component (if applicable):
qpid-java-0.7.946106-5

How reproducible:
Always

Steps to Reproduce:
1. Create a message (ex. Message m = session.createTextMessage("hello");
2. Try to set the destination. Ex
      1. Destination dest = (Destination)ctx.lookup("my-reply-to");
      2. m.setJMSReplyTo(dest)  # exception thrown here.
  
Actual results:
NullPointerException thrown

java.lang.NullPointerException
       at org.apache.qpid.client.message.AMQMessageDelegate_0_10.setJMSReplyTo(AMQMessageDelegate_0_10.java:251)
       at org.apache.qpid.client.message.AbstractJMSMessage.setJMSReplyTo(AbstractJMSMessage.java:138)

Expected results:
Should not throw any exceptions

Additional info:

Comment 1 Rajith Attapattu 2010-07-08 21:38:33 UTC
The fix is committed upstream at rev 961866 in Qpid trunk and applied to the
internal git repo.

http://mrg1.lab.bos.redhat.com/cgit/qpid.git/commit/?id=07da1344dcebd919ab7370d6f4681b29722b9a6e

Comment 2 Jiri Kolar 2010-08-24 17:18:51 UTC
this appear on qpid-java-client-0.7.946106-5  and
is fixed on qpid-java-client-0.7.946106-7
validated on RHEL5.5/RHEL4  i386 / x86_64  

packages:

# rpm -qa | grep -E '(qpid|openais|rhm)' | sort -u
openais-0.80.6-16.el5_5.7
openais-devel-0.80.6-16.el5_5.7
python-qpid-0.7.946106-12.el5
qpid-cpp-client-0.7.946106-12.el5
qpid-cpp-client-devel-0.7.946106-12.el5
qpid-cpp-client-devel-docs-0.7.946106-12.el5
qpid-cpp-client-ssl-0.7.946106-12.el5
qpid-cpp-mrg-debuginfo-0.7.946106-11.el5
qpid-cpp-server-0.7.946106-12.el5
qpid-cpp-server-cluster-0.7.946106-12.el5
qpid-cpp-server-devel-0.7.946106-12.el5
qpid-cpp-server-ssl-0.7.946106-12.el5
qpid-cpp-server-store-0.7.946106-12.el5
qpid-cpp-server-xml-0.7.946106-12.el5
qpid-java-client-0.7.946106-7.el5
qpid-java-common-0.7.946106-7.el5
qpid-tools-0.7.946106-8.el5
rhm-docs-0.7.946106-5.el5
rh-tests-distribution-MRG-Messaging-qpid_common-1.6-53

->VERIFIED


Note You need to log in before you can comment on or make changes to this bug.