4

First of all: I am quite new to Apache Camel and to Stack Overflow!

I have created a route which filters and downloads files from an SFTP Server and deletes those after processing.

My problem: On my local computer the route works perfectly. When I deploy this route (the same .war) on the production server, the download works but when the FTP component tries to delete the file I get the exception below. The development and production machine have the same camel, tomcat and java version. 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";
Helmut
  • 51
  • 1
  • 4

2 Answers2

2

This is some other kind of problem. You need to tell more about the production environment. Do you use some special application server for your Camel app or how do you run it?

That error indicates some kind of class loading issue.

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65
  • Hi Claus, thanks for the quick answer. My prod. server is a plain Tomcat 8.0.5. (same as the dev. server) running as service with admin priviledges. 3 other routes (each route in it's own .war) are already running on it without any problems. Those other routes are not using FTP. Each route is built with Maven. As we have just begun with Camel (which in my opinion is very cool) we have a pretty standard setup without any exotic extras... – Helmut Aug 11 '14 at 07:35
0

This problem is still unsolved. Running in Tomcat in a Windows Server (even as administrator) we did not manage to make this route work. Deploying the route in a Tomcat in Ubuntu Linux it worked right from the start without any modifications!!!

Helmut
  • 51
  • 1
  • 4