Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 642B28455 for ; Thu, 18 Aug 2011 07:29:43 +0000 (UTC) Received: (qmail 22431 invoked by uid 500); 18 Aug 2011 07:29:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 21850 invoked by uid 500); 18 Aug 2011 07:29:10 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 21828 invoked by uid 99); 18 Aug 2011 07:29:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 07:29:00 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sorin7486@gmail.com designates 209.85.213.45 as permitted sender) Received: from [209.85.213.45] (HELO mail-yw0-f45.google.com) (209.85.213.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 07:28:53 +0000 Received: by ywf9 with SMTP id 9so1443224ywf.32 for ; Thu, 18 Aug 2011 00:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:x-google-sender-delegation:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=zCHkTfCaQ1yD1sGhcvD54pzn6vT5uTdFqV63eiwOIm8=; b=sVskGdjsOCDfDXRfHh1MiuXKH6PwVFg1Yn7oDD38lgjm7Hy4FgHeI6rFlOzW1rjn02 UUW+E+kie35HgLTISlM15KqSHRDwtCd6UjV12KGZFZL0u+m7S1P48Dsab6H5LtDzAQ9b v5dUMkFS7G/XM5nWVd1lK4w5CijpqxyMDbA7M= MIME-Version: 1.0 Received: by 10.151.21.15 with SMTP id y15mr369517ybi.412.1313652512108; Thu, 18 Aug 2011 00:28:32 -0700 (PDT) Sender: nekre.rt@gmail.com X-Google-Sender-Delegation: nekre.rt@gmail.com Received: by 10.150.212.16 with HTTP; Thu, 18 Aug 2011 00:28:31 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Aug 2011 10:28:31 +0300 X-Google-Sender-Auth: KHFxL0D7QEWGS4VI4mI5u9Q0gco Message-ID: Subject: Re: doneFileName doesn't seem to work From: Sorin Silaghi To: users@camel.apache.org Content-Type: multipart/alternative; boundary=000e0cd488ee57afa504aac28f62 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd488ee57afa504aac28f62 Content-Type: text/plain; charset=ISO-8859-1 Hi, I managed to figure this one out: in short if I use stepwise=false it works fine. I did some debugging and I traced the problem down to FtpOperations.java at line 522: String[] names; if (directory != null) { names = client.listNames(directory); } else { names = client.listNames(); } Let's say I'm pooling ftp://localhost/dir-name and stepwise=true. When it executes client.listNames(directory) the location on the server is already "/dir-name" and it will try to list "/dir-name/dir-name" which doesn't exist, so it doesn't find the done file. I didn't dig in any deeper but this is clearly a bug. best regards, Sorin. On Wed, Aug 17, 2011 at 11:32 AM, Sorin Silaghi wrote: > ok thanks, I'll give it a try and get back to you. > > > On Tue, Aug 16, 2011 at 6:46 PM, Claus Ibsen wrote: > >> On Tue, Aug 16, 2011 at 5:18 PM, Sorin Silaghi >> wrote: >> > Hi again, >> > >> > >> > After further testing it looks like this works fine for file >> > poolers... is this not implemented on FTP ? >> > >> >> It should be avail from FTP as well. For example we got some unit >> tests in camel-ftp source code. >> >> I suggest to create a small unit test with file first. >> Then try the route with FTP afterwards. >> >> >> > >> > Sorin. >> > >> > >> > >> > On Tue, Aug 16, 2011 at 5:49 PM, Sorin Silaghi >> wrote: >> > >> >> Hi All, >> >> >> >> >> >> My route looks like this: >> >> >> >> >> >> >> >> >> >> >> >> >> >> Every time a file is copied successfully to the FTP server a >> file >> >> with the same name plus the .sem prefix is added. I expected the above >> route >> >> to copy all the successful files from the FTP server but it doesn't >> seem to >> >> work. I also tried to use doneFileName=done and then I added a filed >> called >> >> "done" to the server but that didn't work either. I see no errors, >> nothing >> >> in the logs to explain it. If I remove doneFileName completely it will >> copy >> >> all the files. >> >> >> >> All I see in the logs is the following message: >> >> >> >> 17:47:10,837 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Skipping done >> file: >> >> GenericFile[DPDN_DELIVERY_DPD_0000424239.TXT.sem] >> >> 17:47:10,837 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | File did not >> match. >> >> Will skip this file: GenericFile[DPDN_DELIVERY_DPD_0000424239.TXT.sem] >> >> 17:47:10,837 | TRACE | .140/in/ceva0171 | FtpOperations >> >> | 215 - org.apache.camel.camel-ftp - 2.7.1.fuse-00-43 | >> >> existsFile(in/ceva0171/DPDN_DELIVERY_DPD_0000424240.TXT.sem) >> >> 17:47:10,935 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Done file: >> >> in/ceva0171/DPDN_DELIVERY_DPD_0000424240.TXT.sem does not exist >> >> 17:47:10,935 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | File did not >> match. >> >> Will skip this file: GenericFile[DPDN_DELIVERY_DPD_0000424240.TXT] >> >> 17:47:10,935 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Skipping done >> file: >> >> GenericFile[DPDN_DELIVERY_DPD_0000424240.TXT.sem] >> >> 17:47:10,935 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | File did not >> match. >> >> Will skip this file: GenericFile[DPDN_DELIVERY_DPD_0000424240.TXT.sem] >> >> >> >> and if I use doneFileName=done I get: >> >> >> >> 17:34:17,625 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Done file: >> >> in/ceva0171/done does not exist >> >> 17:34:17,625 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | File did not >> match. >> >> Will skip this file: GenericFile[DELIVERY_FILE_0000424225.TXT] >> >> 17:34:17,625 | TRACE | .140/in/ceva0171 | FtpOperations >> >> | 215 - org.apache.camel.camel-ftp - 2.7.1.fuse-00-43 | >> >> existsFile(in/ceva0171/done) >> >> 17:34:17,720 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Done file: >> >> in/ceva0171/done does not exist >> >> 17:34:17,720 | TRACE | .140/in/ceva0171 | FtpConsumer >> >> | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | File did not >> match. >> >> Will skip this file: GenericFile[DELIVERY_FILE_0000424225.TXT.sem] >> >> 17:34:17,720 | TRACE | .140/in/ceva0171 | FtpOperations >> >> | 215 - org.apache.camel.camel-ftp - 2.7.1.fuse-00-43 | >> >> existsFile(in/ceva0171/done) >> >> >> >> Can anybody tell me why all the files are skipped ? or what do those >> >> messages mean ? >> >> >> >> >> >> >> >> best regards, >> >> Sorin. >> >> >> > >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: cibsen@fusesource.com >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> > > --000e0cd488ee57afa504aac28f62--