[ 
https://issues.apache.org/jira/browse/SSHD-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17572627#comment-17572627
 ] 

Jeremy Norris commented on SSHD-1285:
-------------------------------------

I suspect the issue is because the version published to Sonatype was compiled 
with a newer version of Java, as it appears in later versions of Java, the 
ByteBuffer class started overriding the .clear() method, so the call to it in 
Nio2Session is getting bound to ByteBuffer instead of Buffer.

> 2.9.0 release broken on Java 8
> ------------------------------
>
>                 Key: SSHD-1285
>                 URL: https://issues.apache.org/jira/browse/SSHD-1285
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>         Environment: macOS
>            Reporter: Jeremy Norris
>            Priority: Critical
>
> It appears the 2.9.0 release is broken on Java 8:
> [sshd-SshServer[130ad58d](port=7777)-nio2-thread-5] DEBUG 
> org.apache.sshd.common.io.nio2.Nio2Acceptor - Caught NoSuchMethodError while 
> accepting incoming connection from /127.0.0.1:7777: 
> java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:455)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:334)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:327)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:323)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:319)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:315)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:311)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler.onCompleted(Nio2Acceptor.java:305)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler.onCompleted(Nio2Acceptor.java:260)
>       at 
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)
>       at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
>       at sun.nio.ch.Invoker$2.run(Invoker.java:218)
>       at 
> sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at java.lang.Thread.run(Thread.java:750)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to