Thanks Claus,

I did
from(
                                "jetty:http://0.0.0.0:"; + jettyPort + "/" +
jettyControllerPathIncremental)
                                .process(new Processor() {
                                        @Override
                                        public void process(Exchange exchange) 
throws Exception {
                                                exchange.getIn().setBody("");   
                        
                                        }                       
                                })
                                .pollEnrich(ftpResourceType + "://" + 
ftpResourceUsername + "@"+
ftpResourceUrl + ftpResourcePathIncremental+ "?password=" +
ftpResourcePassword + "&fileName="      + ftpResourceFilenameIncremental+
"&noop=true&idempotent=false")
                                .to("file:/opt/?fileName=testFile.txt");

to enrich my initial content with a ftp file but I get the following error:

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: \opt\testFile.txt
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:240)
        at
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:250)
        at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:152)
        at
org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:77)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
        at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)
        at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)
        at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
        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:69)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
        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:78)
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
        at
org.apache.camel.fabric.FabricTraceProcessor.process(FabricTraceProcessor.java:81)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
        at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:319)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:210)
        at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
        at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:304)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:116)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:79)
        at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
        at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
        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:69)
        at
org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:113)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
        at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1352)
        at
org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:97)
        at
org.apache.camel.component.jetty.CamelMultipartFilter.doFilter(CamelMultipartFilter.java:41)
        at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323)
        at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:476)
        at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
        at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
        at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
        at org.eclipse.jetty.server.Server.handle(Server.java:346)
        at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:438)
        at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:905)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:561)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
        at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:43)
        at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:538)
        at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:43)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.camel.InvalidPayloadException: No body available of
type: java.io.InputStream on: Message: [Body is null]. Caused by: No type
converter available to convert from type: null to the required type:
java.io.InputStream with value null. Exchange[Message: [Body is null]].
Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type
converter available to convert from type: null to the required type:
java.io.InputStream with value null]
        at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:231)
        ... 60 more
Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
converter available to convert from type: null to the required type:
java.io.InputStream with value null
        at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:145)
        at
org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:110)
        at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)
        ... 61 more



--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-consuming-the-same-file-does-not-start-the-second-time-that-it-is-ran-tp5720095p5720103.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to