camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paddy Daly (JIRA)" <>
Subject [jira] Commented: (CAMEL-1428) SftpConsumer : GenericFileRenameProcessStrategy - String index out of bounds
Date Mon, 09 Mar 2009 05:03:40 GMT


Paddy Daly commented on CAMEL-1428:

I've rebuilt both camel-ftp and camel-core and updated my route to use FILE_NAME_ONLY and
I'm getting an error

[e.remote.SftpComponent@110278e] SftpConsumer                   DEBUG About to process file:
GenericFile[temp/incoming/file.txt] using exchange: Exchange[GenericFileMessage: GenericFile[temp/incoming/file.txt]]
[e.remote.SftpComponent@110278e] RouterComponent                INFO  message GenericFileMessage:
[e.remote.SftpComponent@110278e] RouterComponent                INFO  filename file.txt
[e.remote.SftpComponent@110278e] GenericFileProducer            DEBUG Wrote [c:\fileserver\file.txt]
to [Endpoint[file://c://fileserver]]
[e.remote.SftpComponent@110278e] ObjectHelper                   WARN  Cannot find class: org.apache.xalan.xsltc.trax.DOM2SAX
[e.remote.SftpComponent@110278e] SftpConsumer                   DEBUG Done processing file:
GenericFile[temp/incoming/file.txt]. Status is: processed OK
[e.remote.SftpComponent@110278e] SftpConsumer                   DEBUG Committing remote file
strategy: org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@19c4091
for file: GenericFile[temp/incoming/file.txt]
[e.remote.SftpComponent@110278e] SftpOperations                 DEBUG Deleteing file: /\temp\incoming\.done/file.txt
[e.remote.SftpComponent@110278e] SftpOperations                 DEBUG Trying to build remote
directory: \temp\incoming\.done
[e.remote.SftpComponent@110278e] SftpConsumer                   WARN  Error committing remote
file strategy: org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@19c4091
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot create directory:
\temp\incoming\.done (could be because of denied permissions)
	at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.renameFile(
	at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(
	at org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(
	at org.apache.camel.component.file.GenericFileConsumer$1.done(
	at org.apache.camel.processor.UnitOfWorkProcessor$1.done(
	at org.apache.camel.processor.Pipeline.process(


Error seems to be here

DEBUG Deleteing file: /\temp\incoming\.done/file.txt

> SftpConsumer : GenericFileRenameProcessStrategy - String index out of bounds
> ----------------------------------------------------------------------------
>                 Key: CAMEL-1428
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Claus Ibsen
>             Fix For: 2.0-M1
>         Attachments: camel-error.txt, camel-error2.txt, camel-error3.txt, camel-error4.txt
> While trying to consume a file via SFTP and using the moveExpression to move the file
into a done folder a renameException is thrown.
> In GenericFile the relativeFileName reads something like the following.   /incoming/test/file1.txt
> When it tries to call this code and exception is thrown because File.separator is '\'
in a windows environment.
> String relative = relativeFileName.substring(0, relativeFileName.lastIndexOf(File.separator));

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message