camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Andreas Hegle <he...@businesscape.no>
Subject Problem with file-compnent - Files are sent to processing twice
Date Tue, 26 Feb 2008 04:01:52 GMT
Hi

I use camel version 1.2.0 and to configure my file component in the RouteBuilder I use
from("file:"+orderFolder+"?lock=false&delete=true&initialDelay=5000&delay=5000").process(ofp);

However, the ofp (OrderFileProcessor) receives two Exchanges with the file, in stead of one.
I have tried to set the lock to true, but this causes an java.nio.channels.OverlappingFileLockException.

What can I do to fix this?

Thanks in advance

-Ole Andreas

ERROR - FileConsumer                   - 
java.nio.channels.OverlappingFileLockException
	at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1173)
	at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1075)
	at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:837)
	at java.nio.channels.FileChannel.lock(FileChannel.java:860)
	at org.apache.camel.component.file.strategy.FileProcessStrategySupport.begin(FileProcessStrategySupport.java:63)
	at org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:88)
	at org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:49)
	at org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:56)
	at org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:43)
	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:63)
	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:181)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)


Mime
View raw message