camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: File renaming problems under Windows
Date Mon, 17 Sep 2012 16:56:23 GMT
failed due cannot delete from file: C:\in\00800530.txt after copy succeeded

This happens when the InputStream was not properly closed. This could be a
Camel issue or an issue on your side, if you use a custom
bean/processor/... and didn't close the InputStream (in this case).
I think you have to share your code (route) with us, to get more help.

And if you can, upgrade to an newer version (Camel 2.10.1 is the latest).
Camel 2.8.x isn't supported anymore.
It would be helpful to know whether this issue exist in 2.10.1 or not.

Best,
Christian

On Mon, Sep 17, 2012 at 6:18 PM, OrackBahama <jdorfschmid@metadok.de> wrote:

> Hi,
>
> I'm getting exceptions when polling and processing files (in the same
> filesystem). The last camel step is moving the file into a backup or into
> an
> error directory using the parameters 'move' and 'moveFailed' of the file
> component.
>
> I'm aware of renaming problems if there's a different filesystem or
> concurrent consumers trying to read the file, but I'm worried that this
> happens under relatively simple circumstances (Java 6, Camel 2.8.1). Do I
> have to use Java 7 for better native filesystem locking behavior ? Or can I
> configure several retries ?
>
> This is the exception that occurs - thanks for any recommendation in
> advance
> !
>
> 2012-09-15 10:26:13 ERROR : CamelLogger file.GenericFileOnCompletion :
> Caused by:
> [org.apache.camel.component.file.GenericFileOperationFailedException -
> Error
> renaming file from C:\in\00800530.txt to C:\error\2012-09-15\00800530.txt]
> org.apache.camel.component.file.GenericFileOperationFailedException: Error
> renaming file from C:\in\00800530.txt to C:\error\2012-09-15\00800530.txt
>         at
>
> org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:68)
>         at
>
> org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:96)
>         at
>
> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.rollback(GenericFileRenameProcessStrategy.java:68)
>         at
>
> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyRollback(GenericFileOnCompletion.java:154)
>         at
>
> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:89)
>         at
>
> org.apache.camel.component.file.GenericFileOnCompletion.onFailure(GenericFileOnCompletion.java:58)
>         at
>
> org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:53)
>         at
> org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:208)
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:188)
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:37)
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:146)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:105)
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:139)
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:106)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>         at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:353)
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:176)
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:137)
>         at
>
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)
>         at
>
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.IOException: Renaming file from: C:\in\00800530.txt to:
> C:\error\2012-09-15\00800530.txt failed due cannot delete from file:
> C:\in\00800530.txt after copy succeeded
>         at org.apache.camel.util.FileUtil.renameFile(FileUtil.java:379)
>         at
>
> org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:66)
>         ... 31 more
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/File-renaming-problems-under-Windows-tp5719484.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message