camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Yin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6756) File consumer cannot rename a file consumed but failed due to AmbiguousMethodCallException - resulting infinite failure loop
Date Wed, 09 Oct 2013 13:28:42 GMT

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

John Yin commented on CAMEL-6756:
---------------------------------

I knew why there was the exception. That was not what this JIRA issue was for.  I made this
exception to reproduce the real issue.  The real issue was that when the exception was thrown,
the Camel File component failed to delete/rename the file even when the exception is caught
and handled. Because Camel File component failed to remove the file, Camel picked up the file
again and thus got into an infinite loop.  I believe the correct behavior should be:

1. The exception was thrown due to ambiguous method.
2. The exception was caught and handled by onException.
3. The file was removed to .camel.
4. Camel moves on to process other files.

But in reality, the file was not removed and infinite failure loop resulted.  Is my understanding
correct?

Thanks,
John



> 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)

Mime
View raw message