Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E3449EFA for ; Thu, 29 Sep 2011 19:20:07 +0000 (UTC) Received: (qmail 67576 invoked by uid 500); 29 Sep 2011 19:20:07 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 67552 invoked by uid 500); 29 Sep 2011 19:20:07 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 67543 invoked by uid 99); 29 Sep 2011 19:20:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 19:20:07 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 19:20:06 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9B6D92A134C for ; Thu, 29 Sep 2011 19:19:45 +0000 (UTC) Date: Thu, 29 Sep 2011 19:19:45 +0000 (UTC) From: "Jean-Michel Morel (Commented) (JIRA)" To: dev@camel.apache.org Message-ID: <808249262.8736.1317323985638.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1540831474.529.1300713425828.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-3793) Try to copy file when rename fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-3793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117551#comment-13117551 ] Jean-Michel Morel commented on CAMEL-3793: ------------------------------------------ I understand your problem. Have you tried the consumer.exclusiveReadLock parameter ? > Try to copy file when rename fails > ---------------------------------- > > Key: CAMEL-3793 > URL: https://issues.apache.org/jira/browse/CAMEL-3793 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.6.0 > Environment: Linux with NFS mounted directory pointing to a Windows 2008 Server shared directory > Reporter: Jean-Michel Morel > Assignee: Claus Ibsen > Fix For: 2.8.0 > > > I have a setup where I use file component to move files after being processed ou when processing fails. > As I have no troubles neither on my development workstation neither on local directory on my linux environnement. It fails when the monitored directory is a NFS mounted directory pointing to a Windows 2008 Server shared directory. > While it's not a camel bug, the generated logs are just useless because we can't get the reason of failure. > Investigating the source code tells me that the File.renameTo method is used (with the three times try hack for Windows ;), so I can't get any further information on the reason. > Could you implement a fallback strategy like copy the file and delete the original one ? (should it be made optional) > To workaround this, I currently do the move operations manually by invoking the FileUtils.moveTo(...) from commons-io (which implements exactly the fallback method I described on renameTo failure). > But, I have side effects as I'm forced to use the noop attribute. > (in fact, it doesn't explain why the rename fails, but it works, and should it be a failure I'll get an explicit error message). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira