camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marek2009 <>
Subject "Can not delete file" when combining file poller and JMS
Date Wed, 08 Apr 2009 14:39:54 GMT


I have encountered an issue when combining file poller and JMS queue in one
route. If the poller is set to "noop=no" and tries to either delete or move
the files, it fails every now and then (say, every 5th to 10th file). For
instance, with "noop=no&delete=yes" on a Windows machine the exception
thrown is: "2009-03-27T17:13:59,781 [Thread: 1
org.apache.camel.component.file.FileComponent@1af5350] WARN  -
component.file.FileConsumer | Error committing file strategy:
org.apache.camel.component.file.strategy.DeleteFileProcessStrategy@10c81a6 Can not delete file: .\data\pxsa\transfer\in\file.txt"

Apparently, the issue has been discussed in in various Camel forums:

Unfortunately, none of the solutions suggested there (using delete=true,
converting body to string) worked for us 100%. Adding a delay reduced the
occurence of the exception, though. Setting
"consumer.exclusiveReadLock=false" is no option for us, as we want to
prevent incomplete files from being read.

Removing the JMS endpoint from the route in our application prevents the
error, which indicates that the cause is connected to JMS. This is also our
workaround at the moment.

I wonder whether 
a) the problem is familiar to somebody? 
b) there is a "trick", an endpoint setting or an addition to the route, that
reliably eliminates the problem?

Any help is greatly appreciated.

Kind Regards

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message