You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/06/20 17:59:19 UTC
[jira] [Resolved] (CAMEL-6455) Bean component - Calling a bean with
method name with () as empty parameter - Better error message if method
does not exists
[ https://issues.apache.org/jira/browse/CAMEL-6455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-6455.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.11.1)
> Bean component - Calling a bean with method name with () as empty parameter - Better error message if method does not exists
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-6455
> URL: https://issues.apache.org/jira/browse/CAMEL-6455
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.11.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.12.0
>
>
> Calling a bean from a route like
> {code}
> from("direct:start")
> .to("bean:myBean?method=doSomething()")
> .to("mock:result");
> {code}
> Notice the method has () as parameters. Which would refer to a method with no-args.
> But if the method has 1 arg like
> {code}
> public static void doSomething(Exchange exchange) {
> exchange.getIn().setHeader("foo", "bar");
> }
> {code}
> We get this error about some type converter probem
> {code}
> Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.lang.String to the required type: org.apache.camel.Exchange with value
> {code}
> We should have a better error message.
> If removing () then Camel can call the method as it can do parameter matching.
--
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