You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2013/10/09 09:36:45 UTC

[jira] [Commented] (CAMEL-6756) File consumer cannot rename a file consumed but failed due to AmbiguousMethodCallException - resulting infinite failure loop

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

Willem Jiang commented on CAMEL-6756:
-------------------------------------

Hi John,

I just have a quick look at the test case, the AmbiguousMethodCallException is caused by you have two method with same parameters in the MyBean class and Camel cannot tell which method it should invoke. 

You just need to add the method name like this, the AmbiguousMethodCallException will go away.
{code}
<camel:to uri="bean:mybean?method=myMethod1" />
{code}

> File consumer cannot rename a file consumed but failed due to AmbiguousMethodCallException - resulting infinite failure loop
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-6756
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6756
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.0
>         Environment: Windows 8 Pro, JDK 1.7
>            Reporter: John Yin
>            Assignee: Willem Jiang
>         Attachments: JIRACAMEL6756.zip
>
>
> When the following route encounters an AmbiguousMethodCallException in calling bean:converter, the file that causing this problem cannot be renamed/deleted by the File consumer.  The same file would then be processed and result the same error over and over again.
> <camel:route id="route-process-row">
>    <camel:from uri="file:src/data/rowfile" />
>    <camel:to uri="bean:converter" />
>    <camel:onException>               <camel:exception>org.apache.camel.component.bean.AmbiguousMethodCallException</camel:exception>
>       <camel:handled><constant>true</constant></camel:handled>
>       <camel:log message="*** Exception caught ***" />
>    </camel:onException>
> </camel:route>



--
This message was sent by Atlassian JIRA
(v6.1#6144)