3 Replies Latest reply on May 28, 2010 2:49 AM by Piotr Gurgul

    Exception in ordinary Camel File Copier

    Piotr Gurgul Newbie

      Hi there,

       

      I was trying to deploy an ordinary camel file copier with route like

       

      from("file:C:
      input_requests?noop=true").to("file:C:
      output");

       

      to the SMX 4.2 FUSE ESB container but I am getting an exception. (Stacktrace below).

       

      I am trying to overcome this for over a week but I have no clue what can be wrong as it works perfectly using standalone Camel.

       

      I am using 2.2.0-fuse-01-00 version of Camel.

      I would be extremely grateful for any help.

       

      Best,

      Peter

       

      org.apache.camel.component.file.GenericFileOperationFailedException: Cannot stor

      e file: C:\output\req-234221261274093698620.xml

              at org.apache.camel.component.file.FileOperations.storeFile(FileOperatio

      ns.java:211)

              at org.apache.camel.component.file.GenericFileProducer.writeFile(Generic

      FileProducer.java:195)

              at org.apache.camel.component.file.GenericFileProducer.processExchange(G

      enericFileProducer.java:126)

              at org.apache.camel.component.file.GenericFileProducer.process(GenericFi

      leProducer.java:57)

              at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor

      .java:97)

              at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor

      .java:95)

              at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:1

      46)

              at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java

      :94)

              at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:8

      2)

              at org.apache.camel.management.InstrumentationProcessor.process(Instrume

      ntationProcessor.java:67)

              at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProc

      essor.java:53)

              at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcesso

      r.java:82)

              at org.apache.camel.processor.interceptor.TraceInterceptor.process(Trace

      Interceptor.java:93)

              at org.apache.camel.management.InstrumentationProcessor.process(Instrume

      ntationProcessor.java:67)

              at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(Red

      eliveryErrorHandler.java:177)

              at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler

      (RedeliveryErrorHandler.java:143)

              at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE

      rrorHandler.java:88)

              at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHa

      ndler.java:49)

              at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java

      :228)

              at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWork

      Processor.java:66)

              at org.apache.camel.processor.DelegateProcessor.process(DelegateProcesso

      r.java:48)

              at org.apache.camel.management.InstrumentationProcessor.process(Instrume

      ntationProcessor.java:67)

              at org.apache.camel.component.file.GenericFileConsumer.processExchange(G

      enericFileConsumer.java:258)

              at org.apache.camel.component.file.GenericFileConsumer.processBatch(Gene

      ricFileConsumer.java:137)

              at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileC

      onsumer.java:103)

              at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer

      .java:106)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44

      1)

              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(ThreadPoolExec

      utor.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[C:\input_requests\req-23422126127

      4093698620.xml] of type: org.apache.camel.component.file.GenericFile on: Message

      : GenericFile[C:\input_requests\req-234221261274093698620.xml]. Caused by: No ty

      pe converter available to convert from type: org.apache.camel.component.file.Gen

      ericFile to the required type: java.io.InputStream with value GenericFile[C:\inp

      ut_requests\req-234221261274093698620.xml]. Exchange[Message: GenericFile[C:\inp

      ut_requests\req-234221261274093698620.xml]]. Caused by: [org.apache.camel.NoType

      ConversionAvailableException - No type converter available to convert from type:

      org.apache.camel.component.file.GenericFile to the required type: java.io.Input

      Stream with value GenericFile[C:\input_requests\req-234221261274093698620.xml]]

              at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.

      java:103)

              at org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelpe

      r.java:116)

              at org.apache.camel.component.file.FileOperations.storeFile(FileOperatio

      ns.java:203)

              ... 34 more

      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converte

      r available to convert from type: org.apache.camel.component.file.GenericFile to

      the required type: java.io.InputStream with value GenericFile[C:\input_requests

      \req-234221261274093698620.xml]

              at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvert

      To(DefaultTypeConverter.java:123)

              at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.

      java:101)

              ... 36 more