You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Antoine Esnault (JIRA)" <ji...@apache.org> on 2015/04/01 15:03:52 UTC

[jira] [Created] (CAMEL-8585) The lazy load option doesn't unlock the file

Antoine Esnault created CAMEL-8585:
--------------------------------------

             Summary: The lazy load option doesn't unlock the file
                 Key: CAMEL-8585
                 URL: https://issues.apache.org/jira/browse/CAMEL-8585
             Project: Camel
          Issue Type: Bug
          Components: camel-csv
    Affects Versions: 2.15.0
            Reporter: Antoine Esnault
            Priority: Critical


Hi, 
After to upgrade camel from 2.14.1 to 2.15.0, a org.apache.camel.component.file.GenericFileOperationFailedException Exception is thrown when camel move/delete the file at the end of process.
After some tests, I've notice that the issue appear when the lazy load option is enabled. I think, the reader or parser used by the component Apache CSV 1.0 are don't closed at the end of file.

My stacktrace: 
{code}
14:30:48,960 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) org.apache.camel.component.file.GenericFileOperationFailedException: Error renaming file from C:\temp\import\source\file_20150304162756890.csv to C:\temp\import\source\error\file_20150304162756890_20150401143044944.csv

14:30:48,964 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:81)

14:30:48,966 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:113)

14:30:48,973 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.rollback(GenericFileRenameProcessStrategy.java:66)

14:30:48,976 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyRollback(GenericFileOnCompletion.java:151)

14:30:48,977 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:86)

14:30:48,979 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.GenericFileOnCompletion.onFailure(GenericFileOnCompletion.java:58)

14:30:48,980 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:101)

14:30:48,981 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:229)

14:30:48,982 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:65)

14:30:48,983 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:650)

14:30:48,984 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:618)

14:30:48,986 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:240)

14:30:48,987 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.impl.MDCUnitOfWork$MDCCallback.done(MDCUnitOfWork.java:231)

14:30:48,988 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)

14:30:48,989 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

14:30:48,991 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:433)

14:30:48,992 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211)

14:30:48,993 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175)

14:30:48,994 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)

14:30:48,995 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)

14:30:48,997 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

14:30:48,998 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)

14:30:48,999 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)

14:30:49,000 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

14:30:49,001 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

14:30:49,002 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

14:30:49,004 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at java.lang.Thread.run(Thread.java:745)

14:30:49,005 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) Caused by: java.io.IOException: Renaming file from 'C:\temp\import\source\file_20150304162756890.csv' to 'C:\temp\import\source\error\file_20150304162756890_20150401143044944.csv' failed: Cannot delete file 'C:\temp\import\source\file_20150304162756890.csv' after copy succeeded

14:30:49,008 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.util.FileUtil.renameFileUsingCopy(FileUtil.java:471)

14:30:49,010 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.util.FileUtil.renameFile(FileUtil.java:443)

14:30:49,012 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:78)

14:30:49,013 INFO  [stdout] (Camel (Socle-CamelContext) thread #3 - file://C:/temp/import/source) 	... 26 more
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)