You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Schulze, Jan" <ja...@uni-tuebingen.de> on 2021/01/26 11:46:51 UTC

Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

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

Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi

Karaf 4.3.0 upgraded to SSHD 2.x (where as Karaf < 4.2.10 uses SSHD 1.x).

Camel-ssh should be updated to work with both SSHD 1.x and 2.x.

Can you please create a Jira ? I will fix that.

Regards
JB

> Le 26 janv. 2021 à 18:09, Schulze, Jan <ja...@uni-tuebingen.de> a écrit :
> 
> Hi Claus,
> 
> 
> thanks for your reply. I forgot to mention, that I am using Camel in Karaf.
> 
> Along with Camel I also upgraded Karaf (4.2.9 => 4.3.0).
> 
> 
> When using Camel 2.7.1 with Karaf 4.2.9, the camel-ssh component is working without problems.
> 
> 
> Also, the camel features URLs for installing Camel into Karaf both specify mvn:org.apache.sshd/sshd-core/2.0.0 as dependency for camel-ssh
> 
> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
> 
> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.7.1/apache-camel-3.7.1-features.xml
> 
> 
> So it seems to be a Karaf-related issue.
> 
> 
> Using "feature:install camel-ssh" results in the following in a clean Karaf 4.2.9:
> 
> 
> karaf@root()> bundle:list -t 0 | grep -i ssh
> 35 x Active   x  30 x 4.2.9    x Apache Karaf :: Shell :: SSH
> 38 x Active   x  30 x 1.7.0    x Apache Mina SSHD :: Core
> 79 x Active   x  50 x 3.7.1    x camel-ssh
> 101 x Active   x  50 x 2.0.0    x Apache Mina SSHD :: Core
> 
> 
> And in a clean Karaf 4.3.0 it results in:
> 
> karaf@root()> bundle:list -t 0 | grep -i ssh
> 44 x Active   x  30 x 4.3.0              x Apache Karaf :: Shell :: SSH
> 46 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: OSGi
> 47 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SCP
> 48 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SFTP
> 121 x Active   x  50 x 3.7.1              x camel-ssh
> 
> 
> I'm too tired right now to persue this any further. Maybe I can resolve it tomorrow.
> 
> 
> 
> Regards
> --
> Jan Schulze
> Eberhard Karls Universität Tübingen
> ________________________________
> Von: Claus Ibsen <cl...@gmail.com>
> Gesendet: Dienstag, 26. Januar 2021 13:26:16
> An: users@camel.apache.org
> Betreff: Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()
> 
> Hi
> 
> Thanks for reporting. Can you create a JIRA ticket.
> And would you be able to try test with switching to use mina 2.0 JAR
> on the classpath but keep using the 3.7.1 camel version.
> 
> On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
> <ja...@uni-tuebingen.de> wrote:
>> 
>> 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
> 
> 
> 
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2


Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
True, that’s why I’m doing both releases in the meantime.

Just a note: Karaf master (4.3.1-SNAPSHOT) itests already use Camel 3.7.1.

Regards
JB

> Le 27 janv. 2021 à 09:17, Andrea Cosentino <an...@gmail.com> a écrit :
> 
> Yes, but the jetty alias was missing, so we need 4.3.1 release.
> 
> Il giorno mer 27 gen 2021 alle ore 09:13 Jean-Baptiste Onofre <
> jb@nanthrax.net> ha scritto:
> 
>> It’s not tested, but most of the features work fine with Karaf 4.3.0.
>> 
>> However, I agree: I will upgrade to Karaf 4.3.0 for Camel Karaf 3.8.0
>> (it’s already done ;) ).
>> 
>> Regards
>> JB
>> 
>>> Le 27 janv. 2021 à 06:30, Andrea Cosentino <an...@gmail.com> a écrit :
>>> 
>>> Camel 3.7.x doesn't support Karaf 4.3.0, the last version we tested is
>> 4.2.9
>>> 
>>> Il giorno mar 26 gen 2021 alle ore 22:00 Schulze, Jan <
>>> jan.schulze@uni-tuebingen.de> ha scritto:
>>> 
>>>> Hi Claus,
>>>> 
>>>> 
>>>> thanks for your reply. I forgot to mention, that I am using Camel in
>> Karaf.
>>>> 
>>>> Along with Camel I also upgraded Karaf (4.2.9 => 4.3.0).
>>>> 
>>>> 
>>>> When using Camel 2.7.1 with Karaf 4.2.9, the camel-ssh component is
>>>> working without problems.
>>>> 
>>>> 
>>>> Also, the camel features URLs for installing Camel into Karaf both
>> specify
>>>> mvn:org.apache.sshd/sshd-core/2.0.0 as dependency for camel-ssh
>>>> 
>>>> 
>>>> 
>> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
>>>> 
>>>> 
>>>> 
>> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.7.1/apache-camel-3.7.1-features.xml
>>>> 
>>>> 
>>>> So it seems to be a Karaf-related issue.
>>>> 
>>>> 
>>>> Using "feature:install camel-ssh" results in the following in a clean
>>>> Karaf 4.2.9:
>>>> 
>>>> 
>>>> karaf@root()> bundle:list -t 0 | grep -i ssh
>>>> 35 x Active   x  30 x 4.2.9    x Apache Karaf :: Shell :: SSH
>>>> 38 x Active   x  30 x 1.7.0    x Apache Mina SSHD :: Core
>>>> 79 x Active   x  50 x 3.7.1    x camel-ssh
>>>> 101 x Active   x  50 x 2.0.0    x Apache Mina SSHD :: Core
>>>> 
>>>> 
>>>> And in a clean Karaf 4.3.0 it results in:
>>>> 
>>>> karaf@root()> bundle:list -t 0 | grep -i ssh
>>>> 44 x Active   x  30 x 4.3.0              x Apache Karaf :: Shell :: SSH
>>>> 46 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: OSGi
>>>> 47 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SCP
>>>> 48 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SFTP
>>>> 121 x Active   x  50 x 3.7.1              x camel-ssh
>>>> 
>>>> 
>>>> I'm too tired right now to persue this any further. Maybe I can resolve
>> it
>>>> tomorrow.
>>>> 
>>>> 
>>>> 
>>>> Regards
>>>> --
>>>> Jan Schulze
>>>> Eberhard Karls Universität Tübingen
>>>> ________________________________
>>>> Von: Claus Ibsen <cl...@gmail.com>
>>>> Gesendet: Dienstag, 26. Januar 2021 13:26:16
>>>> An: users@camel.apache.org
>>>> Betreff: Re: Component "camel-ssh" broken? - NoSuchMethodError:
>>>> ConnectFuture.getSession()
>>>> 
>>>> Hi
>>>> 
>>>> Thanks for reporting. Can you create a JIRA ticket.
>>>> And would you be able to try test with switching to use mina 2.0 JAR
>>>> on the classpath but keep using the 3.7.1 camel version.
>>>> 
>>>> On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
>>>> <ja...@uni-tuebingen.de> wrote:
>>>>> 
>>>>> 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
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Claus Ibsen
>>>> -----------------
>>>> http://davsclaus.com @davsclaus
>>>> Camel in Action 2: https://www.manning.com/ibsen2
>>>> 
>> 
>> 


Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by Andrea Cosentino <an...@gmail.com>.
Yes, but the jetty alias was missing, so we need 4.3.1 release.

Il giorno mer 27 gen 2021 alle ore 09:13 Jean-Baptiste Onofre <
jb@nanthrax.net> ha scritto:

> It’s not tested, but most of the features work fine with Karaf 4.3.0.
>
> However, I agree: I will upgrade to Karaf 4.3.0 for Camel Karaf 3.8.0
> (it’s already done ;) ).
>
> Regards
> JB
>
> > Le 27 janv. 2021 à 06:30, Andrea Cosentino <an...@gmail.com> a écrit :
> >
> > Camel 3.7.x doesn't support Karaf 4.3.0, the last version we tested is
> 4.2.9
> >
> > Il giorno mar 26 gen 2021 alle ore 22:00 Schulze, Jan <
> > jan.schulze@uni-tuebingen.de> ha scritto:
> >
> >> Hi Claus,
> >>
> >>
> >> thanks for your reply. I forgot to mention, that I am using Camel in
> Karaf.
> >>
> >> Along with Camel I also upgraded Karaf (4.2.9 => 4.3.0).
> >>
> >>
> >> When using Camel 2.7.1 with Karaf 4.2.9, the camel-ssh component is
> >> working without problems.
> >>
> >>
> >> Also, the camel features URLs for installing Camel into Karaf both
> specify
> >> mvn:org.apache.sshd/sshd-core/2.0.0 as dependency for camel-ssh
> >>
> >>
> >>
> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
> >>
> >>
> >>
> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.7.1/apache-camel-3.7.1-features.xml
> >>
> >>
> >> So it seems to be a Karaf-related issue.
> >>
> >>
> >> Using "feature:install camel-ssh" results in the following in a clean
> >> Karaf 4.2.9:
> >>
> >>
> >> karaf@root()> bundle:list -t 0 | grep -i ssh
> >> 35 x Active   x  30 x 4.2.9    x Apache Karaf :: Shell :: SSH
> >> 38 x Active   x  30 x 1.7.0    x Apache Mina SSHD :: Core
> >> 79 x Active   x  50 x 3.7.1    x camel-ssh
> >> 101 x Active   x  50 x 2.0.0    x Apache Mina SSHD :: Core
> >>
> >>
> >> And in a clean Karaf 4.3.0 it results in:
> >>
> >> karaf@root()> bundle:list -t 0 | grep -i ssh
> >> 44 x Active   x  30 x 4.3.0              x Apache Karaf :: Shell :: SSH
> >> 46 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: OSGi
> >> 47 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SCP
> >> 48 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SFTP
> >> 121 x Active   x  50 x 3.7.1              x camel-ssh
> >>
> >>
> >> I'm too tired right now to persue this any further. Maybe I can resolve
> it
> >> tomorrow.
> >>
> >>
> >>
> >> Regards
> >> --
> >> Jan Schulze
> >> Eberhard Karls Universität Tübingen
> >> ________________________________
> >> Von: Claus Ibsen <cl...@gmail.com>
> >> Gesendet: Dienstag, 26. Januar 2021 13:26:16
> >> An: users@camel.apache.org
> >> Betreff: Re: Component "camel-ssh" broken? - NoSuchMethodError:
> >> ConnectFuture.getSession()
> >>
> >> Hi
> >>
> >> Thanks for reporting. Can you create a JIRA ticket.
> >> And would you be able to try test with switching to use mina 2.0 JAR
> >> on the classpath but keep using the 3.7.1 camel version.
> >>
> >> On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
> >> <ja...@uni-tuebingen.de> wrote:
> >>>
> >>> 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
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> http://davsclaus.com @davsclaus
> >> Camel in Action 2: https://www.manning.com/ibsen2
> >>
>
>

Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
It’s not tested, but most of the features work fine with Karaf 4.3.0.

However, I agree: I will upgrade to Karaf 4.3.0 for Camel Karaf 3.8.0 (it’s already done ;) ).

Regards
JB

> Le 27 janv. 2021 à 06:30, Andrea Cosentino <an...@gmail.com> a écrit :
> 
> Camel 3.7.x doesn't support Karaf 4.3.0, the last version we tested is 4.2.9
> 
> Il giorno mar 26 gen 2021 alle ore 22:00 Schulze, Jan <
> jan.schulze@uni-tuebingen.de> ha scritto:
> 
>> Hi Claus,
>> 
>> 
>> thanks for your reply. I forgot to mention, that I am using Camel in Karaf.
>> 
>> Along with Camel I also upgraded Karaf (4.2.9 => 4.3.0).
>> 
>> 
>> When using Camel 2.7.1 with Karaf 4.2.9, the camel-ssh component is
>> working without problems.
>> 
>> 
>> Also, the camel features URLs for installing Camel into Karaf both specify
>> mvn:org.apache.sshd/sshd-core/2.0.0 as dependency for camel-ssh
>> 
>> 
>> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
>> 
>> 
>> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.7.1/apache-camel-3.7.1-features.xml
>> 
>> 
>> So it seems to be a Karaf-related issue.
>> 
>> 
>> Using "feature:install camel-ssh" results in the following in a clean
>> Karaf 4.2.9:
>> 
>> 
>> karaf@root()> bundle:list -t 0 | grep -i ssh
>> 35 x Active   x  30 x 4.2.9    x Apache Karaf :: Shell :: SSH
>> 38 x Active   x  30 x 1.7.0    x Apache Mina SSHD :: Core
>> 79 x Active   x  50 x 3.7.1    x camel-ssh
>> 101 x Active   x  50 x 2.0.0    x Apache Mina SSHD :: Core
>> 
>> 
>> And in a clean Karaf 4.3.0 it results in:
>> 
>> karaf@root()> bundle:list -t 0 | grep -i ssh
>> 44 x Active   x  30 x 4.3.0              x Apache Karaf :: Shell :: SSH
>> 46 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: OSGi
>> 47 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SCP
>> 48 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SFTP
>> 121 x Active   x  50 x 3.7.1              x camel-ssh
>> 
>> 
>> I'm too tired right now to persue this any further. Maybe I can resolve it
>> tomorrow.
>> 
>> 
>> 
>> Regards
>> --
>> Jan Schulze
>> Eberhard Karls Universität Tübingen
>> ________________________________
>> Von: Claus Ibsen <cl...@gmail.com>
>> Gesendet: Dienstag, 26. Januar 2021 13:26:16
>> An: users@camel.apache.org
>> Betreff: Re: Component "camel-ssh" broken? - NoSuchMethodError:
>> ConnectFuture.getSession()
>> 
>> Hi
>> 
>> Thanks for reporting. Can you create a JIRA ticket.
>> And would you be able to try test with switching to use mina 2.0 JAR
>> on the classpath but keep using the 3.7.1 camel version.
>> 
>> On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
>> <ja...@uni-tuebingen.de> wrote:
>>> 
>>> 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
>> 
>> 
>> 
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>> 


Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by Andrea Cosentino <an...@gmail.com>.
Camel 3.7.x doesn't support Karaf 4.3.0, the last version we tested is 4.2.9

Il giorno mar 26 gen 2021 alle ore 22:00 Schulze, Jan <
jan.schulze@uni-tuebingen.de> ha scritto:

> Hi Claus,
>
>
> thanks for your reply. I forgot to mention, that I am using Camel in Karaf.
>
> Along with Camel I also upgraded Karaf (4.2.9 => 4.3.0).
>
>
> When using Camel 2.7.1 with Karaf 4.2.9, the camel-ssh component is
> working without problems.
>
>
> Also, the camel features URLs for installing Camel into Karaf both specify
> mvn:org.apache.sshd/sshd-core/2.0.0 as dependency for camel-ssh
>
>
> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
>
>
> https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.7.1/apache-camel-3.7.1-features.xml
>
>
> So it seems to be a Karaf-related issue.
>
>
> Using "feature:install camel-ssh" results in the following in a clean
> Karaf 4.2.9:
>
>
> karaf@root()> bundle:list -t 0 | grep -i ssh
>  35 x Active   x  30 x 4.2.9    x Apache Karaf :: Shell :: SSH
>  38 x Active   x  30 x 1.7.0    x Apache Mina SSHD :: Core
>  79 x Active   x  50 x 3.7.1    x camel-ssh
> 101 x Active   x  50 x 2.0.0    x Apache Mina SSHD :: Core
>
>
> And in a clean Karaf 4.3.0 it results in:
>
> karaf@root()> bundle:list -t 0 | grep -i ssh
>  44 x Active   x  30 x 4.3.0              x Apache Karaf :: Shell :: SSH
>  46 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: OSGi
>  47 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SCP
>  48 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SFTP
> 121 x Active   x  50 x 3.7.1              x camel-ssh
>
>
> I'm too tired right now to persue this any further. Maybe I can resolve it
> tomorrow.
>
>
>
> Regards
> --
> Jan Schulze
> Eberhard Karls Universität Tübingen
> ________________________________
> Von: Claus Ibsen <cl...@gmail.com>
> Gesendet: Dienstag, 26. Januar 2021 13:26:16
> An: users@camel.apache.org
> Betreff: Re: Component "camel-ssh" broken? - NoSuchMethodError:
> ConnectFuture.getSession()
>
> Hi
>
> Thanks for reporting. Can you create a JIRA ticket.
> And would you be able to try test with switching to use mina 2.0 JAR
> on the classpath but keep using the 3.7.1 camel version.
>
> On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
> <ja...@uni-tuebingen.de> wrote:
> >
> > 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
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

AW: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by "Schulze, Jan" <ja...@uni-tuebingen.de>.
Hi Claus,


thanks for your reply. I forgot to mention, that I am using Camel in Karaf.

Along with Camel I also upgraded Karaf (4.2.9 => 4.3.0).


When using Camel 2.7.1 with Karaf 4.2.9, the camel-ssh component is working without problems.


Also, the camel features URLs for installing Camel into Karaf both specify mvn:org.apache.sshd/sshd-core/2.0.0 as dependency for camel-ssh

https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml

https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.7.1/apache-camel-3.7.1-features.xml


So it seems to be a Karaf-related issue.


Using "feature:install camel-ssh" results in the following in a clean Karaf 4.2.9:


karaf@root()> bundle:list -t 0 | grep -i ssh
 35 x Active   x  30 x 4.2.9    x Apache Karaf :: Shell :: SSH
 38 x Active   x  30 x 1.7.0    x Apache Mina SSHD :: Core
 79 x Active   x  50 x 3.7.1    x camel-ssh
101 x Active   x  50 x 2.0.0    x Apache Mina SSHD :: Core


And in a clean Karaf 4.3.0 it results in:

karaf@root()> bundle:list -t 0 | grep -i ssh
 44 x Active   x  30 x 4.3.0              x Apache Karaf :: Shell :: SSH
 46 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: OSGi
 47 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SCP
 48 x Active   x  30 x 2.5.1              x Apache Mina SSHD :: SFTP
121 x Active   x  50 x 3.7.1              x camel-ssh


I'm too tired right now to persue this any further. Maybe I can resolve it tomorrow.



Regards
--
Jan Schulze
Eberhard Karls Universität Tübingen
________________________________
Von: Claus Ibsen <cl...@gmail.com>
Gesendet: Dienstag, 26. Januar 2021 13:26:16
An: users@camel.apache.org
Betreff: Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Hi

Thanks for reporting. Can you create a JIRA ticket.
And would you be able to try test with switching to use mina 2.0 JAR
on the classpath but keep using the 3.7.1 camel version.

On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
<ja...@uni-tuebingen.de> wrote:
>
> 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



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Component "camel-ssh" broken? - NoSuchMethodError: ConnectFuture.getSession()

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for reporting. Can you create a JIRA ticket.
And would you be able to try test with switching to use mina 2.0 JAR
on the classpath but keep using the 3.7.1 camel version.

On Tue, Jan 26, 2021 at 1:20 PM Schulze, Jan
<ja...@uni-tuebingen.de> wrote:
>
> 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



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2