问题描述:

Below is the configured route :

<camel:endpoint id="srcFolder"

uri="file://SRC?move=.Success&amp;moveFailed=.Error" />

<camel:endpoint id="destFolder"

uri="file://DEST?move=.Success&amp;moveFailed=.Error" />

<camel:route>

<camel:from uri="srcFolder" />

<camel:threads maxPoolSize="12" threadName="tid" id="tid" poolSize="10">

<camel:process ref="my`enter code here`Processor" />

<camel:to ref="destFolder" />

</camel:threads>

</camel:route>

<bean id="myProcessor" class="com.abc.module.MyProcessor" />

Suppose there are 1000 files in the folder SRC,after the route is executed,in the DEST folder i can see all the 1000 files.

But once the file is picked and processed,the files are moved to SRC/.Success.

After processing there will be few files missing in SRC/.Success.

There will be only 990 files moved to SRC/.Success but in DEST folder there will be 1000 files.

Getting below exception for the missing files in SRC/.Success folder:

2016-07-07 16:10:47 GenericFileOnCompletion [WARN] Error during commit. Exchange[[email protected]]. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot rename file: GenericFile[/SRC/file1.zip] to: GenericFile[/SRC/.Success/file1.zip]]

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot rename file: GenericFile[/SRC/file1.zip] to: GenericFile[/SRC/.Success/file1.zip]

at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:115)

at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:88)

at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:144)

at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80)

at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54)

at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:106)

at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:226)

at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:67)

at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:613)

at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:581)

at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:240)

at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:251)

at org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:410)

at org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:81)

at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:145)

at org.apache.camel.processor.ThreadsProcessor$ProcessCall.run(ThreadsProcessor.java:83)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

相关阅读:
Top