You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2016/08/18 20:26:21 UTC

[jira] [Commented] (AMQ-6400) OriginalDestinationPropagateStrategy fails if original JMSmessage is not from ActiveMQ

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

Timothy Bish commented on AMQ-6400:
-----------------------------------

Seems like a nice chance for you to create a fix and test and contribute to the project.  

> OriginalDestinationPropagateStrategy fails if original JMSmessage is not from ActiveMQ
> --------------------------------------------------------------------------------------
>
>                 Key: AMQ-6400
>                 URL: https://issues.apache.org/jira/browse/AMQ-6400
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-camel
>    Affects Versions: 5.14.0
>            Reporter: Kevin Tate
>            Priority: Minor
>
> When using the Camel ActiveMQComponent, if a message originated as a JMS message that did not come from ActiveMQ but is being sent to an ActiveMQ endpoint, then a ClassCastException will occur.
> {noformat}
> java.lang.ClassCastException: org.apache.qpid.client.message.JMSObjectMessage cannot be cast to org.apache.activemq.command.ActiveMQMessage
>         at org.apache.activemq.camel.component.OriginalDestinationPropagateStrategy.onMessageCreated(OriginalDestinationPropagateStrategy.java:44)
>         at org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:309)
> {noformat}
> Adding to the instanceof if block could prevent this issue.
> {noformat}
> if (message instanceof ActiveMQMessage && jms instanceof ActiveMQMessage) {
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)