Bug 695353
| Summary: | High level API addressing: Java client address parser throws java.lang.ClassCastException on valid address | ||
|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Frantisek Reznicek <freznice> |
| Component: | qpid-java | Assignee: | Rajith Attapattu <rattapat+nobody> |
| Status: | CLOSED ERRATA | QA Contact: | Frantisek Reznicek <freznice> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | Development | CC: | esammons, gsim, jneedle, tross |
| Target Milestone: | 2.0 | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qpid-java-0.10-4 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-06-23 15:49:16 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This was fixed in upstream at rev 1085187 and tracked via QPID-3156 The reason why this wasn't included in the 0.10 release branch was bcos it wasn't a regression nor a serious issue as you can easily workaround this by using "durable:false/true" instead of "durable:False/True". I have also downgraded the severity and priority to "medium" to reflect the above. However since a BZ is raised, I will include a fix for this as a patch for the next iteration. Fixed upstream in commits: 1084462, 1085187 The issue has been fixed, tested on RHEL 5.6 / 6.1s5 i[36]86 / x86_64 on packages: python-qpid-0.10-1.el5.noarch python-qpid-qmf-0.10-6.el5.x86_64 qpid-cpp-client-0.10-4.el5.x86_64 qpid-cpp-client-devel-0.10-4.el5.x86_64 qpid-cpp-client-devel-docs-0.10-4.el5.x86_64 qpid-cpp-client-rdma-0.10-4.el5.x86_64 qpid-cpp-client-ssl-0.10-4.el5.x86_64 qpid-cpp-mrg-debuginfo-0.10-4.el5.x86_64 qpid-cpp-server-0.10-4.el5.x86_64 qpid-cpp-server-cluster-0.10-4.el5.x86_64 qpid-cpp-server-devel-0.10-4.el5.x86_64 qpid-cpp-server-rdma-0.10-4.el5.x86_64 qpid-cpp-server-ssl-0.10-4.el5.x86_64 qpid-cpp-server-store-0.10-4.el5.x86_64 qpid-cpp-server-xml-0.10-4.el5.x86_64 qpid-dotnet-0.4.738274-2.el5.x86_64 qpid-java-client-0.10-4.el5.noarch qpid-java-common-0.10-4.el5.noarch qpid-java-example-0.10-4.el5.noarch qpid-qmf-0.10-6.el5.x86_64 qpid-qmf-debuginfo-0.10-6.el5.x86_64 qpid-qmf-devel-0.10-6.el5.x86_64 qpid-tests-0.10-1.el5.noarch qpid-tools-0.10-4.el5.noarch rh-qpid-cpp-tests-0.10-4.el5.x86_64 ruby-qpid-qmf-0.10-6.el5.x86_64 sesame-0.10-1.el5.x86_64 sesame-debuginfo-0.10-1.el5.x86_64 -> 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 |
Description of problem: Current java client code throws java.lang.ClassCastException exception on valid Address: "ADDR;{create:sender, delete:receiver, node: { type:queue, durable:False }}" This behavior is seen on RHEL4/5. Version-Release number of selected component (if applicable): qpid-java-client-0.10-2.el4.noarch qpid-java-common-0.10-2.el4.noarch qpid-java-example-0.10-2.el4.noarch How reproducible: 100% Steps to Reproduce: 1. cd /usr/share/doc/qpid-java-0.10/examples 2. ./run_example.sh org.apache.qpid.example.Spout --count 1 "ADDR;{create:sender, delete:receiver, node: { type:queue, durable:False }}" 3. echo $? Actual results: Java JMS client crashes/aborts on valid address. Expected results: Java JMS client should not crash/abort on valid address. Additional info: [root@mrg-qe-01 examples]# ./run_example.sh org.apache.qpid.example.Spout --count 1 "ADDR;{create:sender, delete:receiver, node: { type:queue, durable:False }}" {count=1} log4j:WARN No appenders could be found for logger (org.apache.qpid.client.AMQConnection). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.net.URISyntaxException: Error parsing address: ADDR;{create:sender, delete:receiver, node: { type:queue, durable:False }} at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:210) at org.apache.qpid.client.AMQAnyDestination.<init>(AMQAnyDestination.java:51) at org.apache.qpid.example.Spout.<init>(Spout.java:90) at org.apache.qpid.example.Spout.main(Spout.java:146) Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String at org.apache.qpid.client.messaging.address.AddressHelper.getDurability(AddressHelper.java:237) at org.apache.qpid.client.messaging.address.AddressHelper.fillInCommonNodeArgs(AddressHelper.java:222) at org.apache.qpid.client.messaging.address.AddressHelper.createQueueNode(AddressHelper.java:215) at org.apache.qpid.client.messaging.address.AddressHelper.getSourceNode(AddressHelper.java:254) at org.apache.qpid.client.AMQDestination.getInfoFromAddress(AMQDestination.java:878) at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:206) ... 3 more or RHEL4: [root@mrg-qe-03 examples]# ./run_example.sh org.apache.qpid.example.Spout --count 1 "ADDR;{create:sender, delete:receiver, node: { type:queue, durable:False }}" {count=1} Apr 11, 2011 9:15:05 AM org.apache.qpid.client.security.DynamicSaslRegistrar registerSaslProviders INFO: Additional SASL providers successfully registered. Apr 11, 2011 9:15:05 AM org.apache.qpid.client.AMQConnection <init> INFO: Connection:amqp://guest:********@test/test?brokerlist='tcp://localhost:5672' Apr 11, 2011 9:15:05 AM org.apache.qpid.client.protocol.AMQProtocolSession <init> INFO: Using ProtocolVersion for Session:0-10 Apr 11, 2011 9:15:05 AM org.apache.qpid.client.handler.ClientMethodDispatcherImpl newMethodDispatcher INFO: New Method Dispatcher:AMQProtocolSession[null] Apr 11, 2011 9:15:05 AM org.apache.qpid.client.AMQConnection <init> INFO: Connecting with ProtocolHandler Version:0-10 Apr 11, 2011 9:15:06 AM org.apache.qpid.client.AMQConnection <init> INFO: Connected with ProtocolHandler Version:0-10 Apr 11, 2011 9:15:06 AM org.apache.qpid.client.AMQSession <init> INFO: Created session:org.apache.qpid.client.AMQSession_0_10@73d573d5 Exception in thread "main" java.net.URISyntaxException: Error parsing address: ADDR;{create:sender, delete:receiver, node: { type:queue, durable:False }} at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:210) at org.apache.qpid.example.Spout.<init>(Spout.java:90) at org.apache.qpid.example.Spout.main(Spout.java:146) Caused by: java.lang.ClassCastException: java.lang.Boolean incompatible with java.lang.String at org.apache.qpid.client.messaging.address.AddressHelper.getDurability(AddressHelper.java:237) at org.apache.qpid.client.messaging.address.AddressHelper.fillInCommonNodeArgs(AddressHelper.java:222) at org.apache.qpid.client.messaging.address.AddressHelper.createQueueNode(AddressHelper.java:215) at org.apache.qpid.client.messaging.address.AddressHelper.getSourceNode(AddressHelper.java:254) at org.apache.qpid.client.AMQDestination.getInfoFromAddress(AMQDestination.java:878) at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:206) ... 2 more [root@mrg-qe-03 examples]# rpm -qa | grep qpid-java qpid-java-client-0.10-2.el4.noarch qpid-java-common-0.10-2.el4.noarch qpid-java-example-0.10-2.el4.noarch [root@mrg-qe-03 examples]# rpm -qa | grep ^java-1.[56] java-1.5.0-ibm-1.5.0.12.3-1jpp.1.el4.x86_64 java-1.5.0-ibm-devel-1.5.0.12.3-1jpp.1.el4.x86_64