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

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

Kevin Tate created AMQ-6400:
-------------------------------

             Summary: 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)