Hi I assume you are using Windows which has a file system which can be troublesome.
Do you have any anti virus or the likes scanning the folder in question? They can block files and cause java programs not to be able to work on the files during the time they block the file. If you try with noop=true instead of move=arch just to ensure that the other things works. Then we knows its "just" the move stuff that causes a problem on Windows. In the mean time let me take a 2nd look at the file component in Camel and see if we can improve it on Windows. On Mon, Oct 12, 2009 at 5:22 AM, sapradin <[email protected]> wrote: > > Hi > > I am having issues in implementing sftp file transfer using camel 2.0. Here > is my route > > <route id="crazyRoute"> > <from > uri="file://C:/file/180/inbound?move=arch&consumer.delay=60000"/> > <setProperty propertyName="SOURCE"> > <constant>180</constant> > </setProperty> > <process ref="processA" /> > <to > uri="sftp://[email protected]/180/in?password=xxxx&knownHostsFile=c:/known_hosts" > /> > </route> > > When i run this route i get following error. It looks like the sftp > component is locking the file and is running in separate thread. > > Can any one plz advice on this. > > ------------ > > 2009-10-07 09:53:20,312 ERROR > [org.apache.camel.component.file.GenericFileOnCompletion] Cannot rename > file: GenericFile[c:\file\180\inbound\mytest.txt] to: > GenericFile[c:\file\180\inbound\arch\mytest.txt] > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > rename file: GenericFile[c:\file\180\inbound\mytest.txt] to: > GenericFile[c:\file\180\inbound\arch\mytest.txt] > at > org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.renameFile(GenericFileRenameProcessStrategy.java:96) > at > org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:72) > at > org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:120) > at > org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82) > at > org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:50) > at > org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:115) > at > org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:60) > at > org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48) > at > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:198) > at > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:120) > at > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:93) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:99) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) > at > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) > at java.lang.Thread.run(Thread.java:595) > > > > -- > View this message in context: > http://www.nabble.com/sftp-file-transfer-issue-tp25850081p25850081.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
