首先:我是Apache Camel和Stack Overflow的新手!
我创建了一个过滤和下载SFTP服务器文件的路由,并在处理后删除这些文件.
我的问题:在我的本地计算机上,路线运行完美.当我在生产服务器上部署此路由(相同的.war)时,下载有效,但当FTP组件尝试删除该文件时,我得到以下异常.开发和生产机器具有相同的camel,tomcat和java版本.唯一的区别是操作系统(开发:Windows 7,产品:Windows Server 2008 R2)
有任何想法吗???
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)
这是路线:
String uri = "sftp://" + sftpUserId + "@" + sftpHost + "?" +
"password=" + sftpPassword + "&" +
"recursive=true" + "&" +
"filter=#fileFilter" + "&" +
"binary=true" + "&" +
"delete=true";
最佳答案 这是另一类问题.您需要详细了解生产环境.您是否为Camel应用程序使用了一些特殊的应用程序服务器,或者如何运行它?
该错误表明某种类加载问题.