Hi, "camel-ssh" component is throwing a CamelExecutionException when it is used to write a file via SSH. It used to be working in Camel 3.4.0, but after upgrading to 3.7.1, I observe the following stack trace:
org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[F2205BFA0B31B1C-0000000000000000] at org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:45) ~[!/:3.7.1] at org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425) ~[!/:3.7.1] at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:69) ~[!/:3.7.1] at org.apache.camel.processor.SendProcessor.lambda$process$2(SendProcessor.java:188) ~[!/:3.7.1] at org.apache.camel.support.cache.DefaultProducerCache.doInAsyncProducer(DefaultProducerCache.java:317) ~[!/:3.7.1] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:187) ~[!/:3.7.1] at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:714) [!/:3.7.1] at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:623) [!/:3.7.1] at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) [!/:3.7.1] at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60) [!/:3.7.1] at org.apache.camel.processor.Pipeline.process(Pipeline.java:147) [!/:3.7.1] at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312) [!/:3.7.1] at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:207) [!/:3.7.1] at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76) [!/:3.7.1] at java.util.TimerThread.mainLoop(Timer.java:556) [?:?] at java.util.TimerThread.run(Timer.java:506) [?:?] Caused by: java.lang.NoSuchMethodError: 'org.apache.sshd.client.session.ClientSession org.apache.sshd.client.future.ConnectFuture.getSession()' at org.apache.camel.component.ssh.SshHelper.sendExecCommand(SshHelper.java:84) ~[?:?] at org.apache.camel.component.ssh.SshProducer.process(SshProducer.java:74) ~[?:?] at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66) ~[!/:3.7.1] ... 13 more The Camel route for writing the file is very simple (and has not changed during the Camel upgrade): .setHeader("currentDate", simple("${date:now:yyyy-MM-dd}", String.class)) .setHeader("filename", simple("/tmp/test.text", String.class)) .setBody(simple("echo ${header.currentDate} > ${header.filename};")) .to("ssh://username:password@hostname") It seems, that some changes to Mina SSHD in "org.apache.sshd.client.future.ConnectFuture.java" related to the following JIRA are responsible: https://issues.apache.org/jira/browse/SSHD-842 Camel 3.4.0 (working) uses Mina 2.0.0, whereas Camel 3.7.1 uses Mina 2.5.1. The changes from the mentioned JIRA are in effect since Mina 2.1.0. Can anyone confirm? Regards -- Jan Schulze Eberhard Karls Universität Tübingen