You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Sree Panchajanyam D (JIRA)" <ji...@apache.org> on 2013/11/02 12:31:18 UTC
[jira] [Updated] (CAMEL-6927) Bean Transformer throwing
org.apache.camel.TypeConversionException: Error during type conversion from
type: due argument type mismatch
[ https://issues.apache.org/jira/browse/CAMEL-6927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sree Panchajanyam D updated CAMEL-6927:
---------------------------------------
Attachment: EventToPayloadExtracted.java
FallBackConverted
> Bean Transformer throwing org.apache.camel.TypeConversionException: Error during type conversion from type: due argument type mismatch
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-6927
> URL: https://issues.apache.org/jira/browse/CAMEL-6927
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.9.3, 2.9.4, 2.9.5, 2.10.0, 2.10.1, 2.10.2, 2.10.3, 2.10.4, 2.10.5, 2.10.6, 2.10.7, 2.11.2
> Environment: Windows 7
> Reporter: Sree Panchajanyam D
> Priority: Blocker
> Labels: features
> Attachments: EventToPayloadExtracter.java
>
>
> Same piece of camel.xml and POJO working in camel 2.9.2.
> Issue encountered in camel 2.9.3 and all above versions.
> When trying to start apache camel embedded inside activemq (or camel starting as standalone on Jetty container), I encountered the following exception :
> Caused by: org.apache.camel.TypeConversionException: Error during type conversion from type: com.messagetransformers.StringAppenderBean to the required type: org.apache.camel.Processor with value com.messagetransformers.StringAppenderBean@77b407 due argument type mismatch
> at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:126)
> at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:98)
> at org.apache.camel.util.CamelContextHelper.convertTo(CamelContextHelper.java:72)
> Extract from my camel.xml
> <bean id="beanTransformer" class="com.messagetransformers.StringAppenderBean"/>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
> <route id="beanTransformRoute" autoStartup="true">
> <description>Transformer Route</description>
> <from uri="activemqRoute1:MY.QUEUE.1"/>
> <bean ref="beanTransformer" method="process"/>
> <to uri="activemqRoute1:MY.QUEUE.2"/>
> </route>
> </camelContext>
> Code snippet from that is causing this issue org.apache.camel.impl.converter.BaseTypeConverterRegistry.java(doConvertTo method)
> Object rc;
> if (tryConvert) {
> rc = tc.tryConvertTo(type, exchange, value);
> } else {
> rc = tc.convertTo(type, exchange, value);
> }
> The else part is not there in Camel 2.9.2 and is introduced from Camel 2.9.3.
> This code seems to force a normal bean to register as a FallbackTypeConverter which is causing the issue.
> Removing the else condition from camel 2.10.3 solved the issue.
> My question is, is it expected that normal bean definitions should fail from upwards of camel 2.9.3? Documentation seems to say nothing about it. Please help
--
This message was sent by Atlassian JIRA
(v6.1#6144)