camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apejavar <>
Subject Bug in the BeanConverter class
Date Thu, 26 Aug 2010 00:38:54 GMT

I have a camel pipeline route that looks something like this:

<proxy id="someProxy"
            serviceInterface="SomeInterface" />

   <from uri="direct:someEndpoint"/>
   <to uri="bean:someDecorator"/>
   <to uri="activemqCore:queue:someQueue?transferException=true"/>

The decorator, someDecorator has the following method signature:

void decorate(final BaseClassOfSuper baseClass, final Message message);

Now if I use my proxy to send SuperClass I get a
NoTypeConversionAvailableException exception.

Looking at the org.apache.camel.component.bean.BeanConverter class, it has
(on line 51 of rel 2.4.0):

if (from.isAssignableFrom(type)) {
                return body;

This should instead read:
if (type.isAssignableFrom(from)) {
                return body;

because you always assign "from" to "type" and not vice versa.

 - Ashwin

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message