You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/09/09 09:54:16 UTC
[GitHub] [camel] CZuegner commented on pull request #8335: Rename strategy filesystem exception
CZuegner commented on PR #8335:
URL: https://github.com/apache/camel/pull/8335#issuecomment-1241759953
My testcase is to use readlock=rename strategy.
Stacktrace when file is blocked by another process:
2022-09-09 11:51:19,050 WARN [org.apa.cam.com.fil.FileConsumer] (Camel (camel-9) thread #9 - file://c:%5Ctemp%5Cinput) file://c:%5Ctemp%5Cinput?delay=1000&move=c%3A%5Ctemp%5Csave%2F%24%7Bfile%3Aname%7D&moveFailed=c%3A%5Ctemp%5Cerror%2F%24%7Bfile%3Aname%7D cannot begin processing file: GenericFile[c:\temp\input\test.txt] due to: Error renaming file from c:\temp\input\test.txt to c:\temp\input\test.txt.camelExclusiveReadLock. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Error renaming file from c:\temp\input\test.txt to c:\temp\input\test.txt.camelExclusiveReadLock]: org.apache.camel.component.file.GenericFileOperationFailedException: Error renaming file from c:\temp\input\test.txt to c:\temp\input\test.txt.camelExclusiveReadLock
at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:93)
at org.apache.camel.component.file.strategy.GenericFileRenameExclusiveReadLockStrategy.acquireExclusiveReadLock(GenericFileRenameExclusiveReadLockStrategy.java:80)
at org.apache.camel.component.file.strategy.FileRenameExclusiveReadLockStrategy.acquireExclusiveReadLock(FileRenameExclusiveReadLockStrategy.java:49)
at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.begin(GenericFileProcessStrategySupport.java:72)
at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.begin(GenericFileRenameProcessStrategy.java:39)
at com.osramos.dsimaptransfer.util.MoveInvalidProcessingStrategy.begin(MoveInvalidProcessingStrategy.java:39)
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:388)
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:245)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:206)
at org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:202)
at org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:116)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.nio.file.FileSystemException: c:\temp\ input\test.txt -> c:\temp\input\test.txt.camelExclusiveReadLock: The process cannot access the file because it is being used by another process.
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:202)
at java.base/sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:283)
at java.base/java.nio.file.Files.copy(Files.java:1295)
at org.apache.camel.util.FileUtil.copyFile(FileUtil.java:480)
at org.apache.camel.util.FileUtil.renameFileUsingCopy(FileUtil.java:462)
at org.apache.camel.util.FileUtil.renameFile(FileUtil.java:436)
at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:90)
... 16 more
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org