Apache Camel FTP Download not deleting remote file
First of all: I'm pretty new to Apache Camel and Stack Overflow!
I created a route that filters and downloads files from an SFTP server and removes them after processing.
My problem: On my local machine, the route works fine. When I deploy this route (same .war) to the production server, the download is done, but when the FTP component tries to delete the file, I get the below exception. The dev and production machine has one camel version, tomcat and java. The only difference is the OS (Dev: Windows 7, Prod: Windows Server 2008 R2)
Any ideas ???
java.lang.IllegalArgumentException: Resolving language: header detected type conflict: Not a Language implementation. Found: org.apache.camel.language.header.HeaderLanguage
at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:76)
at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:1135)
at org.apache.camel.model.language.ExpressionDefinition.createExpression(ExpressionDefinition.java:177)
at org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:118)
at org.apache.camel.builder.BinaryPredicateSupport.matchesReturningFailureMessage(BinaryPredicateSupport.java:60)
at org.apache.camel.builder.BinaryPredicateSupport.matches(BinaryPredicateSupport.java:50)
at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:90)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:60)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:166)
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:99)
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Here's the route:
String uri = "sftp://" + sftpUserId + "@" + sftpHost + "?" +
"password=" + sftpPassword + "&" +
"recursive=true" + "&" +
"filter=#fileFilter" + "&" +
"binary=true" + "&" +
"delete=true";
+3
source to share