Claus Ibsen-2 wrote: > > And you are sure your bean does not throw a NPE exception? > > But yeah without a stacktrace or any more detailed logging its hard to > work out. >
I actually got a stack trace this time: [2009-12-04 01:46:53,105][WARN][Thread: 1 org.apache.camel.component.file.filecompon...@1c04f13][camel.impl.scheduledpollconsumer(ScheduledPollConsumer)-run(68)]: An exception occured while polling: Endpoint[file:data/input?consumer.recursive=false&lock=true&consumer.exclusiveReadLock=true&noop=true]: null java.lang.NullPointerException at org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:99) at org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:66) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66) at etc... however, a few lines before that, I got a: Caused by: java.io.IOException: Too many open files from a different exception. So, it's not really a camel bug, although the error from camel is a bit misleading. btw, the code around line 99 is if (isValidFile(fileOrDirectory)) { if (LOG.isTraceEnabled()) { LOG.trace("Polling directory " + fileOrDirectory); } File[] files = fileOrDirectory.listFiles(); for (File file : files) { <------ line 99 rc += pollFileOrDirectory(file, isRecursive()); // self-recursion } } listFiles() is defined to return null is some cases. Camel 2.0 has an explicit check for that, and just silently returns. eric -- View this message in context: http://old.nabble.com/NullPointerException-in-FileComponent-tp26594231p26636156.html Sent from the Camel - Users mailing list archive at Nabble.com.