Bug 612526 - NullPointerException thrown when you pass an address based destination to the setJMSReplyTo() in a Message.
NullPointerException thrown when you pass an address based destination to the...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
Development
All Linux
high Severity high
: 1.3
: ---
Assigned To: Rajith Attapattu
Jeff Needle
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-08 09:06 EDT by Rajith Attapattu
Modified: 2010-10-20 09:53 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rajith Attapattu 2010-07-08 09:06:14 EDT
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 17:38:33 EDT
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 13:18:51 EDT
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.