Hi

You may try configuring a FTPClientConfig instance, and configure the
Camel ftp endpoint to use that
using the ftpClientConfig option.

On the FTPClientConfig you can setup timezone and the likes. Check the
Apache Commons Net documentation.


On Fri, Sep 23, 2011 at 3:55 PM, lenp
<[email protected]> wrote:
> Hi!
>
> Connecting to an old ftp server on an old AIX server. Something may be
> configured incorrect on that server but there is no competence nor wish to
> fiddle around with it.
>
> Problem is that some files/folders will not be listed by camel ftp endpoint.
> Example:
>
> This is a raw listing:
>
> 212-status of /data:
> total 18744
> -rw-r--r--   1 system   6757020 mar 11 2008  anstalld
> -rw-r--r--   1 system   0            aug 09 2002  avisur
> drwxr-sr-x  38 sys      1024       feb 04 2009   bi
> -rw-r-----   1 system   32384     mar 04 2008  klinikenheter.txt
> -rw-r--r--   1 system   5            maj 25 2009  namn
> -rw-r--r--   1 system   1492870 mar 04 2008  nyanst
> -rw-r-----   1 system   1157638 mar 04 2008  PROGRESSanst.prn
> -rw-r--r--   1 system   17          mar 11 2008  sttest.fil
> drwxr-xr-x   2 system 512         apr 09 2008  tillf
> -rw-r--r--   1 system   3106       mar 11 2008  uttag.p
> drwxr-sr-x  38 sys      1024       nov 11 2010  v5
> drwxr-sr-x  16 sys      4608       sep 21 13.08 wrk
> -rw-r--r--   1 system   18167     maj 25 2010  wwrk
> 212 End of Status
>
> But when tracing camel i get this:
> 2011-09-23 15:30:14,543 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> getCurrentDirectory()
> 2011-09-23 15:30:14,543 TRACE
> [org.apache.camel.component.file.remote.FtpConsumer] (Camel Thread 52 - )
> doPollDirectory from absolutePath: /data, dirName: null
> 2011-09-23 15:30:14,559 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> Changing directory: /
> 2011-09-23 15:30:14,559 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> Changing directory: data
> 2011-09-23 15:30:14,559 TRACE
> [org.apache.camel.component.file.remote.FtpConsumer] (Camel Thread 52 - f)
> Polling directory: /data
> 2011-09-23 15:30:14,559 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> listFiles()
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.component.file.remote.FtpConsumer] (Camel Thread 52 - f)
> Found 12 in directory: /data
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: anstalld
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: avisur
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: klinikenheter.txt
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: namn
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: nyanst
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: PROGRESSanst.prn
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: sttest.fil
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: uttag.p
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.spring.util.SpringAntPathMatcherFileFilter] (Camel Thread
> 52 - ) Filtering file: wwrk
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> Changing directory: /
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> Changing directory: home
> 2011-09-23 15:30:14,575 TRACE
> [org.apache.camel.component.file.remote.FtpOperations] (Camel Thread 52 - )
> Changing directory: jbosssoa
> 2011-09-23 15:30:14,575 DEBUG
> [org.apache.camel.component.file.remote.FtpConsumer] (Camel Thread 52 - )
> Took 0.032 seconds to poll: /data
>
> That is - all files/folders are found exept one, the folder wrk. What
> differs that folder is that it has been modified during this year and
> therefore listing includes a timestamp. And if you look at that timestamp it
> has . (period) as timestamp seperator which is not standard seperator here
> in Sweden, it is : (semicolon). My guess is that the ftp2 endpoint mixes
> things up when coming to the wrk folder and it goes wrong. But no errors or
> warnings.
>
> Also tested with some graphical ftp clients and they are most often not able
> to list those files/folders either.
>
> What can I do with camel to workaround this problem? Using version 2.8.
>
> regards,
>
> /L
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/FTP2-not-listing-all-files-folders-tp4833608p4833608.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to