David J. M. Karlsen created CAMEL-6307:
------------------------------------------

             Summary: Regression in 2.11.0 bean invocation
                 Key: CAMEL-6307
                 URL: https://issues.apache.org/jira/browse/CAMEL-6307
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.11.0
         Environment: N/A
            Reporter: David J. M. Karlsen


When upgradring from 2.10.2 to 2.11.0 I met this regression:

I have a step in my route which invokes a bean:
{noformat}
<camel:to uri="bean:transferConverter?method=transferToMultimap( ${body} )" />
{noformat}

after the upgrade it threw:
{noformat}
org.apache.camel.CamelExecutionException: Exception occurred during execution 
on the exchange: Exchange[Message: BeanInvocation public abstract 
com.mycomp.Transfer com.mycomp.TransferService.doTransfer(com.mycomp.Transfer) 
with [com.mycomp.Transfer@7e299629[.....]]]]

Caused by: org.apache.camel.NoTypeConversionAvailableException: No type 
converter available to convert from type: java.lang.String to the required 
type: com.mycomp.Transfer with value   
        at 
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:181)
 ~[camel-core-2.11.0.jar:2.11.0]
        at 
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:149)
 ~[camel-core-2.11.0.jar:2.11.0]
        at 
org.apache.camel.component.bean.MethodInfo$2.evaluateParameterValue(MethodInfo.java:540)
 ~[camel-core-2.11.0.jar:2.11.0]

{noformat}

If I change the route to:
{noformat}
<camel:to uri="bean:transferConverter?method=transferToMultimap(${body})" />
{noformat}
(notice no whitespace before/after ${body} it works as before.

The problematic code seems to be in org.apache.camel.component.bean.MethodInfo

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to