ClassCastException with useSSH

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ClassCastException with useSSH

rkmoquin
Hi, has anyone tried using the karaf-maven-plugin run goal with the useSsh option set to true?
If seems that if you just start up a vanilla 4.2.5 and 4.2.6 with it, you will see this stacktrace:

2019-08-03T21:25:33,790 | WARN  | activator-1-thread-1 | Activator                        | 36 - org.apache.karaf.shell.ssh - 4.2.5 | Error starting activator
java.lang.ClassCastException: Cannot cast org.apache.sshd.common.util.security.bouncycastle.BouncyCastleSecurityProviderRegistrar to org.apache.sshd.common.util.security.SecurityProviderRegistrar
at java.lang.Class.cast(Class.java:3369) ~[?:?]
at org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:114) ~[39:org.apache.sshd.core:1.7.0]
at org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:121) ~[39:org.apache.sshd.core:1.7.0]
at org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:107) ~[39:org.apache.sshd.core:1.7.0]
at org.apache.sshd.common.util.security.SecurityUtils.register(SecurityUtils.java:397) ~[39:org.apache.sshd.core:1.7.0]
at org.apache.sshd.common.util.security.SecurityUtils.isEDDSACurveSupported(SecurityUtils.java:529) ~[39:org.apache.sshd.core:1.7.0]
at org.apache.sshd.common.signature.BuiltinSignatures$6.isSupported(BuiltinSignatures.java:103) ~[39:org.apache.sshd.core:1.7.0]
at org.apache.sshd.common.NamedFactory.lambda$setUpBuiltinFactories$1(NamedFactory.java:63) ~[39:org.apache.sshd.core:1.7.0]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:?]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:?]

As I mentioned, this happens with installing anything into the containing.  Thought it might be useful to be able to have that option turned on.

Thanks for any help!
Ryan
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

jbonofre
Hi Ryan,

let me try to reproduce. Thanks for the report.

Regards
JB

On 04/08/2019 03:33, Ryan Moquin wrote:

> Hi, has anyone tried using the karaf-maven-plugin run goal with the
> useSsh option set to true?
> If seems that if you just start up a vanilla 4.2.5 and 4.2.6 with it,
> you will see this stacktrace:
>
> 2019-08-03T21:25:33,790 | WARN  | activator-1-thread-1 | Activator      
>                  | 36 - org.apache.karaf.shell.ssh - 4.2.5 | Error
> starting activator
> java.lang.ClassCastException: Cannot cast
> org.apache.sshd.common.util.security.bouncycastle.BouncyCastleSecurityProviderRegistrar
> to org.apache.sshd.common.util.security.SecurityProviderRegistrar
> at java.lang.Class.cast(Class.java:3369) ~[?:?]
> at
> org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:114)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:121)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:107)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.security.SecurityUtils.register(SecurityUtils.java:397)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.security.SecurityUtils.isEDDSACurveSupported(SecurityUtils.java:529)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.signature.BuiltinSignatures$6.isSupported(BuiltinSignatures.java:103)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.NamedFactory.lambda$setUpBuiltinFactories$1(NamedFactory.java:63)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:?]
> at
> java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
> ~[?:?]
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> ~[?:?]
> at
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> ~[?:?]
> at
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
> ~[?:?]
>
> As I mentioned, this happens with installing anything into the
> containing.  Thought it might be useful to be able to have that option
> turned on.
>
> Thanks for any help!
> Ryan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

rkmoquin
No prob.  It's an odd error.  I didn't think bouncy castle is used by default.

Ryan

On Sun, Aug 4, 2019, 12:36 AM Jean-Baptiste Onofré <[hidden email]> wrote:
Hi Ryan,

let me try to reproduce. Thanks for the report.

Regards
JB

On 04/08/2019 03:33, Ryan Moquin wrote:
> Hi, has anyone tried using the karaf-maven-plugin run goal with the
> useSsh option set to true?
> If seems that if you just start up a vanilla 4.2.5 and 4.2.6 with it,
> you will see this stacktrace:
>
> 2019-08-03T21:25:33,790 | WARN  | activator-1-thread-1 | Activator      
>                  | 36 - org.apache.karaf.shell.ssh - 4.2.5 | Error
> starting activator
> java.lang.ClassCastException: Cannot cast
> org.apache.sshd.common.util.security.bouncycastle.BouncyCastleSecurityProviderRegistrar
> to org.apache.sshd.common.util.security.SecurityProviderRegistrar
> at java.lang.Class.cast(Class.java:3369) ~[?:?]
> at
> org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:114)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:121)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.threads.ThreadUtils.createDefaultInstance(ThreadUtils.java:107)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.security.SecurityUtils.register(SecurityUtils.java:397)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.util.security.SecurityUtils.isEDDSACurveSupported(SecurityUtils.java:529)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.signature.BuiltinSignatures$6.isSupported(BuiltinSignatures.java:103)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> org.apache.sshd.common.NamedFactory.lambda$setUpBuiltinFactories$1(NamedFactory.java:63)
> ~[39:org.apache.sshd.core:1.7.0]
> at
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:?]
> at
> java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
> ~[?:?]
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> ~[?:?]
> at
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> ~[?:?]
> at
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
> ~[?:?]
>
> As I mentioned, this happens with installing anything into the
> containing.  Thought it might be useful to be able to have that option
> turned on.
>
> Thanks for any help!
> Ryan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

stefang
In reply to this post by rkmoquin
Hi, anything new on this?

we also failed with this error and makes karaf:run unusable in situations
where you have to execute something after start with karaf maven plugin
client  



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

jbonofre
Hi,

Let me try to reproduce (afair I added an invoker in the build to test
it, not sure though).

Regards
JB

On 03/10/2019 10:13, stefang wrote:

> Hi, anything new on this?
>
> we also failed with this error and makes karaf:run unusable in situations
> where you have to execute something after start with karaf maven plugin
> client  
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

stefang
Hi JB,

are you able to reproduce this?
This would speedup development if it works in combination of fixing this.

https://issues.apache.org/jira/browse/KARAF-6444


Stefan




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

stefang
Hi,

any Chance to get this fixed in the next Version?

Regards

Stefan



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException with useSSH

jbonofre
Hi

Yes it will be fixed in 4.2.8. Let me double check the fix.

Regards
JB

Le 4 nov. 2019 08:22, stefang <[hidden email]> a écrit :

Hi,

any Chance to get this fixed in the next Version?

Regards

Stefan



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html