camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajithamol Lakshmanan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11670) Camel Aggregator strategy Exchange- java.lang.ClassCastException - org.apache.camel.impl.DefaultMessage cannot be cast to org.apache.camel.component.jms.JmsMessage
Date Tue, 22 Aug 2017 02:31:00 GMT

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

Rajithamol Lakshmanan commented on CAMEL-11670:
-----------------------------------------------

Thanks for the response.

My aggregation strategy is to combine incoming javax.Message object into a list. These are
TextMessage so it would be as good as getting the body from camel's DefaultMessage. But it
was more convenient and clear on what we are aggregating instead of reading the body as a
string. Also this is running in production and would like to avoid any refactoring. I thought
it  must a bug since it used to work and suddenly broken with later version

> 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
>    Affects Versions: 2.18.0
>            Reporter: Rajithamol Lakshmanan
>            Assignee: Claus Ibsen
>
> 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)

Mime
View raw message