Hi Robin,
sorry for delay, i read your response only now.

I try to figure out the problem ASAP

Regards

--Filippo


2013/3/12 Lutter, Robin <robin.lut...@t-systems.com>

> Hi Claus,
>
> i think the error is in method  FileUtil.isWindows() because it determines
> the separator char for client os and not for server os. The given setting
> for separator is ignored at this place.
> I would suggest to change FtpOperations line 656  to path =
> FileUtil.compactPath(path, endpoint.getConfiguration().getSeparator());
>
> Should I fill an jira ticket for 2.11?
>
> Regards Robin
> I think there is an similar thread from xuloo 'camel-ftp 2.10.4 fails to
> connect on windows'
>
> -----Ursprüngliche Nachricht-----
> Von: Lutter, Robin
> Gesendet: Montag, 11. März 2013 15:57
> An: users@camel.apache.org
> Betreff: AW: Files cannot be moved on FTP
>
> Hi Claus,
>
> We are already using stepwise=false.
> This is the ftp-uri I have in my testcase:
> from("ftp://"; + getFTPServerAddress() +
>                         "/test?password=secret" +
>                         "&ftpClient.dataTimeout=30000&stepwise=false" +
>                         "&passiveMode=true&binary=true" +
>                         "&move=success&separator=UNIX" +
>                         "&antInclude=FILE.TXT")
>                         .log("${body}");
>
> Tracing file.remote turns out, that  FileUtil normalizePath is using
> File.separator from local system and not the separator setting TRACE
> org.apache.camel.component.file.remote.FtpOperations -
> changeCurrentDirectory(/)
> TRACE org.apache.camel.component.file.remote.FtpOperations - Changing
> directory: \\
>
> With stepwise=true the extra escaped backslash is away:
> TRACE org.apache.camel.component.file.remote.FtpOperations -
> changeCurrentDirectory(/)
> TRACE org.apache.camel.component.file.remote.FtpOperations - Changing
> directory: \
>
> Regards Robin
>
> On Thu, Mar 7, 2013 at 12:04 AM, Claus Ibsen <claus.ib...@gmail.com>
> wrote:
> > On Wed, Mar 6, 2013 at 12:05 PM, Lutter, Robin
> <robin.lut...@t-systems.com> wrote:
> >> Hi Claus,
> >>
> >> we use ftp. Setting separator to UNIX doesn't help. Contrary the
> error
> >> occurs earlier in process:
> >>
> >> WARN  org.apache.camel.component.file.GenericFileOnCompletion -
> Caused
> >> by:
> >> [org.apache.camel.component.file.GenericFileOperationFailedException
> >> - File operation failed: 550 Failed to change directory.
> >>  Cannot change directory to: \\. Code: 550]
> >> org.apache.camel.component.file.GenericFileOperationFailedException:
> >> File operation failed: 550 Failed to change directory.
> >>
> >> Strange: server log can still contains CWD \\
> >>
> >
> > Can you try with stepwise=false
> > You can read more about this option at: http://camel.apache.org/ftp2
> >
> > And yeah looks like we should fix that double slash bug. It ought to
> be a single slash.
> >
> > If you get this error all the time. Then feel free to enable TRACE
> logging on org.apache.camel.component.file.remote
> >
> > Then we can possible use that to bettet understand what goes wrong.
> >
> >
> >
> >> Regards Robin
> >>
> >> On Wed, Mar 6, 2013 at 11:23 AM, Claus Ibsen <claus.ib...@gmail.com>
> >> wrote:
> >>> On Wed, Mar 6, 2013 at 10:31 AM, Lutter, Robin
> >> <robin.lut...@t-systems.com> wrote:
> >>> > Hi Filippo Balicchia,
> >>> >
> >>> > i can confirm, that move works with camel-ftp 2.10.4 and apache
> >>> > ftpserver project on windows maschine with JDK 1.6.0_33.
> >>> > While running with ftp server under RHEL 6 move failed with
> >> errorcode
> >>> > 550. Rename works with commandline.
> >>> >
> >>> > Logs from ftpserver:
> >>> >>  CWD 20121201000000.OML                     "550 Failed to change
> >>> > directory."
> >>> >>  CWD "\"
> >>> > "550 Failed to change directory."
> >>> >>  CWD \\
> >>> > "550 Failed to change directory."
> >>> >>  CWD "
> >>> > "550 Failed to change directory."
> >>> >
> >>> > Differences in log between 2.10.2 and 2.10.4
> >>> > 2.10.2:                         2.10.4
> >>> > CWD test/success                         CWD test/success
> >>> > PWD                                                   PWD
> >>> > CWD /                                                CWD \\
> >>> >
> >>> > Regards
> >>> > Robin
> >>>
> >>> Are you using the ftp or sftp. Just to be sure which one is being
> >> used.
> >>>
> >>> Also you can try setting separator=Unix to tell Camel to use / for
> >> path separators.
> >>>
> >>>
> >>> --
> >>> Claus Ibsen
> >>> -----------------
> >>> Red Hat, Inc.
> >>> FuseSource is now part of Red Hat
> >>> Email: cib...@redhat.com
> >>> Web: http://fusesource.com
> >>> Twitter: davsclaus
> >>> Blog: http://davsclaus.com
> >>> Author of Camel in Action: http://www.manning.com/ibsen
>
>

Reply via email to