Created attachment 476159 [details] Receiver program demonstrating problem Description of problem: The QueueReceiver interface is part of JMS. However this part of the API cannot be used with Destinations defined using the new addressing scheme. Version-Release number of selected component (if applicable): qpid-java-client-0.7.946106-12.el5 How reproducible: 100% Steps to Reproduce: 1. create queue called direct 2. run attached receiver Actual results: Exception occurred: java.lang.ClassCastException: org.apache.qpid.client.AMQAnyDestination cannot be cast to org.apache.qpid.client.AMQQueue java.lang.ClassCastException: org.apache.qpid.client.AMQAnyDestination cannot be cast to org.apache.qpid.client.AMQQueue at org.apache.qpid.client.AMQSession.createReceiver(AMQSession.java:1217) at org.apache.qpid.client.AMQQueueSessionAdaptor.createReceiver(AMQQueueSessionAdaptor.java:75) Expected results: No exception, receiver able to receive messages sent to that queue
Fixed in upstream at rev 1076516. http://svn.apache.org/viewvc?rev=1076516&view=rev.
The fixes are now included in rpms from version qpid-java-0.9.1080013-2
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: When creating a QueueReceiver with a destination created using an addressing string a java.lang.ClassCastException is thrown. Consequence: The application is unable to create QueueReceivers from destinations created using an addressing string. The workaround was to create a Queue using session.createQueue method passing an address string. Fix: The createReceiver method has been modified to check if the destination passed in is an instance of javax.jms.Queue and org.apache.qpid.client.AMQDestination instead of just casting the destination into org.apache.qpid.client.AMQTopic The code is now modified to work with the javax.jms.Queue interface instead of the concrete implementation. Result: The createReceiver method is now able to create a QueueReceiver from a destination created using an address string.
This issue has been fixed Verified on RHEL4.9, RHEL5.6 and RHEL6.1, architectures: i386, x86_64 packages installed: qpid-java-example-0.10-2.el5 qpid-java-common-0.10-2.el5 qpid-java-client-0.10-2.el5 -> VERIFIED
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0890.html