You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rajithamol Lakshmanan (JIRA)" <ji...@apache.org> on 2017/08/14 18:57:00 UTC

[jira] [Created] (CAMEL-11670) Camel Aggregator strategy Exchange- java.lang.ClassCastException - org.apache.camel.impl.DefaultMessage cannot be cast to org.apache.camel.component.jms.JmsMessage

Rajithamol Lakshmanan created CAMEL-11670:
---------------------------------------------

             Summary: Camel Aggregator strategy Exchange- java.lang.ClassCastException - org.apache.camel.impl.DefaultMessage cannot be cast to org.apache.camel.component.jms.JmsMessage
                 Key: CAMEL-11670
                 URL: https://issues.apache.org/jira/browse/CAMEL-11670
             Project: Camel
          Issue Type: Bug
            Reporter: Rajithamol Lakshmanan


I am using camel-aggregator for aggregating JMS messages. When I upgraded the camel version from 2.15.6 to 2.18.0 I started getting ClassCastException  in the aggregatorstrategy class. 

Error occurred during aggregation. Exchange[]. Caused by: [java.lang.ClassCastException - org.apache.camel.impl.DefaultMessage cannot be cast to org.apache.camel.component.jms.JmsMessage]. 

I debugged and found that AggregatorProcessor calls ExchangeHelper.createCorrelatedCopy which copies the exchange harcoding the safeMode to be true. 

In 2.18.0 : Exchange copy = exchange.copy(true); 
In 2.15.6 : Exchange copy = exchange.copy(); 

Because of this we are not getting the original JMS message- javax.jms.Message inside org.apache.camel.Message .

Can we have an option to configure this deep copy option?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)