4

首先:我对 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";
4

2 回答 2

2

这是其他类型的问题。您需要更多地了解生产环境。您是否为您的 Camel 应用程序使用了一些特殊的应用程序服务器,或者您如何运行它?

该错误表明某种类加载问题。

于 2014-08-08T12:11:40.807 回答
0

这个问题仍然没有解决。在 Windows Server 中的 Tomcat 中运行(即使以管理员身份),我们也没有设法使这条路线工作。在 Ubuntu Linux 中的 Tomcat 中部署路由,它从一开始就可以正常工作,无需任何修改!!!

于 2014-11-13T15:27:34.297 回答