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 DA41685C9 for ; Thu, 18 Aug 2011 12:30:38 +0000 (UTC) Received: (qmail 25127 invoked by uid 500); 18 Aug 2011 12:30:38 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24992 invoked by uid 500); 18 Aug 2011 12:30:35 -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 24975 invoked by uid 99); 18 Aug 2011 12:30:32 -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 12:30:32 +0000 X-ASF-Spam-Status: No, hits=4.1 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLY,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 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-gw0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 12:30:25 +0000 Received: by gwb19 with SMTP id 19so956164gwb.32 for ; Thu, 18 Aug 2011 05:30:04 -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=53mX2K1nxLaNrCz2FQVLDvLjVFSJVoKf7XmsR2rp+qM=; b=UeVCWmOlsBBcq7OOxlXzLaGcpY3OkjHohtAhZhAp6DhXTIGt27r+WCz0nTVoMj39O+ iKUr/KIioay+16QZ8hxY3mXNUxpHEIFx0SEWZclt6ez7OMn3kPXmifz9lOdM5WLihNDc EDU9C+wI6H9a5W3esc0mPeGBhp/pXC7YKLdKc= MIME-Version: 1.0 Received: by 10.142.152.2 with SMTP id z2mr373716wfd.403.1313670604169; Thu, 18 Aug 2011 05:30:04 -0700 (PDT) Sender: nekre.rt@gmail.com X-Google-Sender-Delegation: nekre.rt@gmail.com Received: by 10.68.44.9 with HTTP; Thu, 18 Aug 2011 05:30:04 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Aug 2011 15:30:04 +0300 X-Google-Sender-Auth: 2HiEV6tJO3gi850C_pxjvk0BmYo Message-ID: Subject: Re: doneFileName doesn't seem to work From: Sorin Silaghi To: users@camel.apache.org Content-Type: multipart/alternative; boundary=000e0cd22f6cb6a33404aac6c542 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd22f6cb6a33404aac6c542 Content-Type: text/plain; charset=ISO-8859-1 Hello The URI is: ftp://user@localhost/in?password=secret&doneFileName=${file:name}.sem And it's running on Camel 2.6.0-fuse-01-15 and Fuse ESB 4.3.1-fuse-01-15. I also tried it on the latest version of Fuse ESB(4.4.0) and I had the same problem. Sorin On Thu, Aug 18, 2011 at 1:14 PM, Claus Ibsen wrote: > Hi > > Can you post your ftp endpoint uri configuration? > And what version of Camel are you using? > > > > On Thu, Aug 18, 2011 at 9:28 AM, Sorin Silaghi > wrote: > > 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/ > >>> > >> > >> > > > > > > -- > 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/ > --000e0cd22f6cb6a33404aac6c542--