You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ole Andreas Hegle <he...@businesscape.no> on 2008/03/07 04:13:43 UTC
Help, the file-component is going bananas
Hi
I have a problem with the file-component. I have used the file-component
without problem for about a year, but when I was delivering an upgraded
software pack, an error occured out of no-where. I have never had it
before, and now I have it all the time. The file-component works
perfectlly with my older software, but with my new software, or any
simple software I create, I get this exception below. (The lock file is
not removed, and if I use lock = false, the file is processed time after
time in an infinite loop)
What can I do to sort this out?
Code I use, (On camel-core 1.2.0, Java 6)
@Override
public void configure() throws Exception {
from("file://c:/test").process(new Processor() {
public void process(Exchange exchange) throws Exception {
Object body = exchange.getIn().getBody();
System.out.println(body);
}
});
}
public APP() throws Exception{
context = new JndiContext();
camelContext = new DefaultCamelContext(context);
camelContext.addRoutes(new MyRouteBuilder(camelContext));
camelContext.start();
}
Regards 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:126)
at
org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:68)
at
org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:76)
at
org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:49)
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)
*
**
*