camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GSegel <gsegel...@itsfac.com>
Subject File component not working with 2.5 snapshot
Date Thu, 14 Oct 2010 12:50:57 GMT

I posted on the developer forum (under the thread about JIRA 3223) but it
appears my post didn't get submitted or something.  I think this bug is
related to what I'm seeing but it's more severe than what the JIRA ticket
describes.

Anyway, I'm having issues using the File component.  Thinking it was my
code, I created a very simple route based on an example:

from("file://inputdir/?delete=true").to("file://output") 

When I drop a file into the directory, it doesn't get processed and I get a
loop of exceptions...here's a portion of what I see:


13:41:15,150 ERROR [GenericFileOnCompletion] Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot store file: output\classpath.sh] 
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: output\classpath.sh 
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:215) 
        at
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:222)

        at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:138)

        at
org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:59) 
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)

        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) 
        at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104) 
        at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272) 
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98) 
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) 
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)

        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)

        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)

        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) 
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)

        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)

        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)

        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) 
        at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:297)

        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:206)

        at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256) 
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99) 
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) 
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)

        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)

        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)

        at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:322)

        at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:155)

        at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121) 
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97) 
        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:886) 
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
        at java.lang.Thread.run(Thread.java:619) 
Caused by: org.apache.camel.InvalidPayloadException: No body available of
type: java.io.InputStream but has value: GenericFile[classpath.sh] of type:
org.apache.camel.component.file.GenericFile on: Message:
GenericFile[classpath.sh]. Caused by: No type converter available to convert
from type: org.apache.camel.component.file.GenericFile to the required type:
java.io.InputStream with value GenericFile[classpath.sh]. Exchange[Message:
GenericFile[classpath.sh]]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type: org.apache.camel.component.file.GenericFile
to the required type: java.io.InputStream with value
GenericFile[classpath.sh]] 
        at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:102) 
        at
org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:115) 
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:207) 
        ... 38 more 
Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
converter available to convert from type:
org.apache.camel.component.file.GenericFile to the required type:
java.io.InputStream with value GenericFile[classpath.sh] 
        at
org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:142)

        at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:100) 
        ... 40 more
-- 
View this message in context: http://camel.465427.n5.nabble.com/File-component-not-working-with-2-5-snapshot-tp3212019p3212019.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message