Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 73572 invoked from network); 9 Mar 2009 05:04:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2009 05:04:01 -0000 Received: (qmail 38503 invoked by uid 500); 9 Mar 2009 05:04:01 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 38481 invoked by uid 500); 9 Mar 2009 05:04:01 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 38470 invoked by uid 500); 9 Mar 2009 05:04:01 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 38466 invoked by uid 99); 9 Mar 2009 05:04:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2009 22:04:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2009 05:04:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BC61D29A0012 for ; Sun, 8 Mar 2009 22:03:40 -0700 (PDT) Message-ID: <389174243.1236575020753.JavaMail.jira@brutus> Date: Sun, 8 Mar 2009 22:03:40 -0700 (PDT) From: "Paddy Daly (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1428) SftpConsumer : GenericFileRenameProcessStrategy - String index out of bounds In-Reply-To: <1184226389.1236272984964.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50324#action_50324 ] 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 {code} [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: GenericFile[temp/incoming/file.txt] [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(GenericFileRenameProcessStrategy.java:74) at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:58) at org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(GenericFileConsumer.java:226) at org.apache.camel.component.file.GenericFileConsumer$1.done(GenericFileConsumer.java:180) at org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:57) at org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:74) at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) {code} Error seems to be here DEBUG Deleteing file: /\temp\incoming\.done/file.txt > SftpConsumer : GenericFileRenameProcessStrategy - String index out of bounds > ---------------------------------------------------------------------------- > > Key: CAMEL-1428 > URL: https://issues.apache.org/activemq/browse/CAMEL-1428 > 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.