Brad1944 opened a new issue, #499: URL: https://github.com/apache/mina-sshd/issues/499
### Version 2.12.1 ### Bug description I noticed that ExceptionUtils#peelException() returns a somewhat weird exception on my GW6 (java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/management/ReflectionException), after digging into its code I found that this code got triggered when its not supposed to ```java // Android does not have these classes if (!OsUtils.isAndroid()) { if (t instanceof ReflectionException) { Throwable target = ((ReflectionException) t).getTargetException(); if (target != null) { return peelException(target); } } else if (t instanceof MBeanException) { Throwable target = ((MBeanException) t).getTargetException(); if (target != null) { return peelException(target); } } } ``` After inspecting it by debug logs, I found out that OsUtils#isAndroid() returns false when its supposed to be true ### Actual behavior It returns false ### Expected behavior It returns true? ### Relevant log output ```Shell FATAL EXCEPTION: main Process: top.apip.sftpserver, PID: 27567 java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/management/ReflectionException; at org.apache.sshd.common.util.ExceptionUtils.peelException(ExceptionUtils.java:126) at org.apache.sshd.common.util.ExceptionUtils.peelException(ExceptionUtils.java:118) at org.apache.sshd.common.util.security.SecurityEntityFactory$1.getInstance(SecurityEntityFactory.java:93) at org.apache.sshd.common.util.security.SecurityUtils.getKeyAgreement(SecurityUtils.java:772) at org.apache.sshd.common.kex.MontgomeryCurve.<init>(MontgomeryCurve.java:121) at org.apache.sshd.common.kex.MontgomeryCurve.<clinit>(MontgomeryCurve.java:95) at org.apache.sshd.common.kex.BuiltinDHFactories$13.isSupported(BuiltinDHFactories.java:260) at org.apache.sshd.common.NamedFactory.lambda$setUpTransformedFactories$0(NamedFactory.java:54) at org.apache.sshd.common.NamedFactory$$ExternalSyntheticLambda0.test(D8$$SyntheticClass:0) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:184) at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:475) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:236) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:517) at org.apache.sshd.common.NamedFactory.setUpTransformedFactories(NamedFactory.java:56) at org.apache.sshd.server.ServerBuilder.setUpDefaultKeyExchanges(ServerBuilder.java:178) at org.apache.sshd.server.ServerBuilder.fillWithDefaultValues(ServerBuilder.java:119) at org.apache.sshd.server.ServerBuilder.fillWithDefaultValues(ServerBuilder.java:58) at org.apache.sshd.common.BaseBuilder.build(BaseBuilder.java:273) at org.apache.sshd.server.ServerBuilder.build(ServerBuilder.java:151) at org.apache.sshd.server.ServerBuilder.build(ServerBuilder.java:58) at org.apache.sshd.common.BaseBuilder.build(BaseBuilder.java:297) at org.apache.sshd.server.SshServer.setUpDefaultServer(SshServer.java:442) at top.apip.sftpserver.presentation.MainActivityKt.SetupSftpServer(MainActivity.kt:135) at top.apip.sftpserver.presentation.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:67) at top.apip.sftpserver.presentation.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:66) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428) at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252) at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228) at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:195) at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119) at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228) ``` ### Other information _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org