On Wed, Aug 22, 2012 at 7:37 PM, Pontus Ullgren <ullg...@gmail.com> wrote: > Here [1] is a testcase to reproduce the issue. However I'm not sure if > this really a issue or a feature. > Might be good to stop somebody from doing a stupid thing such as using > the root folder as inbox for files :-) > > [1] https://gist.github.com/3427801 >
Well essentially you could consume from the root folder. Doing that is though unusual, as most ppl consume from a given directory. But nevertheless its a minor bug in Camel. Fell free to create a JIRA. And patches is welcome. > > > Best regards > Pontus > > > On Wed, Aug 22, 2012 at 7:25 PM, Pontus Ullgren <ullg...@gmail.com> wrote: >> I get the same result on linux. >> The problem seems to be that ObjectHelper.after(..) returns null when >> endpointNormalized is "/". >> >> >> // Pontus >> >> On Wed, Aug 22, 2012 at 4:24 PM, tonyperrin <tony.per...@yahoo.co.uk> wrote: >>> Sure. Mac OSX 10.7.4. Java version 1.6 though also 1.5. Camel I've used >>> both v 2.7.1 and 2.10.0 and I get the same thing. stacktrace below. Can I >>> just ask should it be possible to read from a root folder? >>> >>> Thank you >>> >>> [(camel-1) thread #1 - file:///] ultPollingConsumerPollStrategy WARN >>> Consumer Consumer[file:///?noop=true] could not poll endpoint: >>> Endpoint[file:///?noop=true] caused by: null >>> java.lang.NullPointerException >>> at java.io.File.<init>(File.java:222) >>> at >>> org.apache.camel.component.file.FileConsumer.asGenericFile(FileConsumer.java:144) >>> at >>> org.apache.camel.component.file.FileConsumer.pollDirectory(FileConsumer.java:81) >>> at >>> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:107) >>> at >>> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139) >>> at >>> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91) >>> 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:180) >>> at >>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>> at java.lang.Thread.run(Thread.java:680) >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Setting-root-folder-as-endpoint-Could-not-poll-endpoint-NPE-tp5717845p5717856.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen