-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsatisfiedLinkError on ch.qos.logback.classic.Logger #2
Comments
We see the same problem today with Spring Boot deployment too using GraalVM. |
I bypassed the issue creating a substitution directly in graal substratevm. The problem is that the method sun.reflect.Reflection.getCallerClass(int) is no more supported in Java8, hance not implemented in substratevm.
in the file com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_jdk_internal_reflect_Reflection.java Another possible approach is to try update the logback library: as you can see the current version 1.2.3 is a bit old and the current alpha implementation of the PackagingDataCalculator class (that triggers the getCallerClass call) does not contain reference to this method anymore:
I used as a reference this thread: oracle/graal#748 |
Simplest thing to do is remove logback and then you'll see the real problem that is causing it to need to do the digging for stack trace info. |
Hello,
I'm trying to reuse your library on one of my spring boot applications. After some tweaks I've been able to generate native image and start it successfully.
After the web server is up & running, at each request I get the following error:
Exception in thread "reactor-http-nio-2" java.lang.UnsatisfiedLinkError: sun.reflect.Reflection.getCallerClass(I)Ljava/lang/Class; [symbol: Java_sun_reflect_Reflection_getCallerClass or Java_sun_reflect_Reflection_getCallerClass__I]
at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:145)
at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
at sun.reflect.Reflection.getCallerClass(Reflection.java)
at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:85)
at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:58)
at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:142)
at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:122)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.log(Logger.java:765)
at io.netty.util.internal.logging.LocationAwareSlf4JLogger.log(LocationAwareSlf4JLogger.java:46)
at io.netty.util.internal.logging.LocationAwareSlf4JLogger.warn(LocationAwareSlf4JLogger.java:209)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:908)
at java.lang.Thread.run(Thread.java:748)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:473)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
I was wondering if this has to do with missing entries in reflect.json file.
thanks for your support
The text was updated successfully, but these errors were encountered: