Is you file /tmp/foo/test empty (ie no data in the file)?
oisin wrote: > > I have the most trivial route, expressed declaratively: > > <camelContext id="default" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <route> > <from uri="file:///tmp/foo"/> > <to uri="file:///tmp/bar" /> > </route> > </camelContext> > > I had expected that this would simply shuttled data from one file > endpoint (directory) > to another as it arrived, but on running it and adding a file to the > <from>, Camel throws > an exception (see log at end of message). > > What am I missing? > > cheers > --oh > > > 01:17:20,480 | ERROR | [EMAIL PROTECTED] | DeadLetterChannel > | rg.apache.camel.processor.Logger 143 | Failed delivery for > exchangeId: ID-chutney/50155-1205187959575/0-65. On delivery attempt: > 0 caught: org.apache.camel.InvalidPayloadException: No in body > available of type: java.io.InputStream but has value: /tmp/foo/test of > type: java.io.File on the exchange: Exchange[FileMessage: > /tmp/foo/test] > org.apache.camel.InvalidPayloadException: No in body available of > type: java.io.InputStream but has value: /tmp/foo/test of type: > java.io.File on the exchange: Exchange[FileMessage: /tmp/foo/test] > at > org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:118) > at > org.apache.camel.component.file.FileProducer.process(FileProducer.java:71) > at > org.apache.camel.component.file.FileProducer.process(FileProducer.java:60) > at > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:73) > at > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:143) > at > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:87) > at > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:40) > at > org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:132) > at > org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:69) > at > org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:77) > at > org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:50) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:63) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) > at > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280) > at > java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) > at java.lang.Thread.run(Thread.java:613) > > -- View this message in context: http://www.nabble.com/Error-running-trivial-file-%3Efile-route-tp15972735s22882p15974866.html Sent from the Camel - Users mailing list archive at Nabble.com.
