camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From borgel <borge.lo...@gmail.com>
Subject Re: From file to ftp
Date Tue, 22 Jan 2008 10:40:03 GMT

Hmmm,

I have tried several variations of
file://whatever?moveNamePrefix=someThing
but I am getting the same error.

I also tried file://whatever?delete=true
Then the file is uploaded again and again and again, but never deleted.

If I use noop=true nothing happens.

I think i will go back to create a new File() in Java and send that to the
endpoint. That seemed to work.

Regards
Børge.


James.Strachan wrote:
> 
> On 22/01/2008, borgel <borge.lotre@gmail.com> wrote:
>>
>> Hi,
>>
>> I have upgraded to Camel 1.3.0-RC1. When I start the server all the files
>> in
>> the catalog are uploaded to the ftp server, but I receives the following
>> error:
>> 2008-01-22 09:25:25,826 ERROR [FileConsumer] - Could not rename file
>> from:
>> c:\temp\camel\theFile.txt to c:\temp\camel\.camel\theFile.txt
>> java.io.IOException: Could not rename file from:
>> c:\temp\camel\theFile.txt
>> to c:\temp\camel\.camel\theFile.txt
>>         at
>> org.apache.camel.component.file.strategy.RenameFileProcessStrategy.commit(RenameFileProcessStrategy.java:63)
>>         at
>> org.apache.camel.component.file.FileConsumer$2.done(FileConsumer.java:136)
>>         at
>> org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:45)
>>         at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:163)
>>         at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:87)
>>         at
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:40)
>>         at
>> org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:132)
>>         at
>> org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:69)
>>         at
>> org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:77)
>>         at
>> org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:50)
>>         at
>> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:63)
>>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>> Source)
>>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown
>> Source)
>>         at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
>>         at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
>> Source)
>>         at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
>> Source)
>>         at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
>> Source)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
>> Source)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>> Source)
>>         at java.lang.Thread.run(Unknown Source)
>>
>>
>> When I add new files to the directory nothing happens. Could this be due
>> to
>> some security restriction on the File system?
> 
> The default File behaviour is that instead of deleting files, it tries
> to rename them (moving them into a .camel directory). You can change
> the prefix/postfix of renamed files, or just get Camel to delete the
> files instead if you like; or leave the file there and use timestamps
> to determine if it should be processed again.
> http://activemq.apache.org/camel/file.html
> 
> I'm not sure why the rename fails; I wonder if Java on Window can't
> rename files to a subdirectory? Maybe try using the URI
> 
>   file://whatever?moveNamePrefix=.
> 
> To avoid the rename to a .camel directory?
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/From-file-to-ftp-tp14921828s22882p15016251.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message