You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ulrich Romahn (JIRA)" <ji...@apache.org> on 2013/12/11 19:43:06 UTC

[jira] [Commented] (QPID-5417) lassCastException when using amqp-1-0-jms-0.24 client

    [ https://issues.apache.org/jira/browse/QPID-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13845620#comment-13845620 ] 

Ulrich Romahn commented on QPID-5417:
-------------------------------------

I have create a public Github repo with the demo application that shows the issue/exception here:
https://github.com/uromahn/qpid-jms-test

To reproduce just follow those steps:

Pre-requisite:
A qpid-cpp 0.24 broker setup supporting AMQP 1-0. Also a queue with the name 'gce.queue' will have to be created.

1. create a local clone of this repo
2. 'cd' into that project folder and build the app (assuming you have Maven 3.0.5 installed and in your path)
3. Import the project into Eclipse or Netbeans and run the Main.java class locally
4. In the console, enter any text - this should send a text message to your broker
5. observe the Exception in the message reader.

> lassCastException when using amqp-1-0-jms-0.24 client
> -----------------------------------------------------
>
>                 Key: QPID-5417
>                 URL: https://issues.apache.org/jira/browse/QPID-5417
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.24
>         Environment: qpid-cpp 0.24 broker with AMQP 1-0 support (via Proton 0.4) running on a CentOS 6.0 host. Client running on LinuxMint 15 Desktop
>            Reporter: Ulrich Romahn
>            Priority: Critical
>
> I have installed a qpid-cpp broker (via source) on my CentOS machine and successfully started.
> I have then created a simple (but more extended) test application using the amqp-1-0-jms client library.
> I can successfully connect to an ActiveMQ 5.9 as well as a qpid-java 0.24 broker and exchange messages via a configured queue.
> However, when I connect to my qpid-cpp broker (also 0.24 with proton 0.4), I can send messages to a queue, but when trying to read from the queue I am getting the following error message:
> Exception in thread "Thread-7" java.lang.ClassCastException: org.apache.qpid.amqp_1_0.type.Symbol cannot be cast to org.apache.qpid.amqp_1_0.type.Section
>         at org.apache.qpid.amqp_1_0.messaging.SectionDecoderImpl.parseAll(SectionDecoderImpl.java:49)
>         at org.apache.qpid.amqp_1_0.client.Receiver.receive(Receiver.java:280)
>         at org.apache.qpid.amqp_1_0.jms.impl.MessageConsumerImpl.receive0(MessageConsumerImpl.java:286)
>         at org.apache.qpid.amqp_1_0.jms.impl.SessionImpl$Dispatcher.run(SessionImpl.java:859)
>         at java.lang.Thread.run(Thread.java:744)
> Please note: I also re-compiled my test app using the latest 0.26-SNAPSHOT jms client from source with the exact same error - in fact, the stack trace above comes from this version, in case anybody was wondering.
> Also, to verify my installations are all correct, I tried a similar test using the Java example coming with qpid-proton 0.5 and could successfully connect and exchange messages with any broker speaking AMQP 1-0 (qpid-cpp, qpid-java, ActiveMQ, and Apache Apollo)! 
> I believe the issue is not actually in the subscriber, but in how the message gets put into the queue.
> I ran the following test as well:
> 1. I put a message into my queue using a simple test application with the amqp-1-0-jms client library.
> 2. I then used the proton-j Recv.java test application to connect to this queue (which is setup as "durable"). The proton-j 0.5 client now threw the exact same ClassCastException. 



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org