-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Native Image UnresolvedElementException sun.misc.SharedSecrets since version 3.5.2 #3334
Comments
@JohT I created one simple application that uses only |
@violetagg, I'll have a look at it when I find some time and try "to break" it to ideally get a simple reproducer. |
@violetagg, i could reproduce the issue after some experimentation by adding the native image build argument I needed to add slf4j-api to overcome an error that classes of this library are missing. References: |
@JohT So basically you are disabling the default behaviour in GraalVM which is
I would recommend to follow up with |
As i understand this, What I still don't get is why this error occurs in version 3.5.2 after providing the reflection-config.json with Related reactor-core commit. If the reproducer is switched to version 3.5.1 then everything seems fine. |
@violetagg, is there a chance to have a look at https://github.com/reactor/reactor-core/blob/main/reactor-core/src/main/java/reactor/core/publisher/Traces.java and simplify the code to not use reactor-core/reactor-core/build.gradle Line 308 in 912441f
|
…age configuration Traces$SharedSecretsCallSiteSupplierFactory is targeting JDK 8, it uses sun.misc.SharedSecrets which is unavailable on Java 9+ Current GraalVM 22.3.1 provides Java 11/17/19-based GraalVM https://www.graalvm.org/release-notes/22_3/ Fixes #3334
…age configuration (#3339) Traces$SharedSecretsCallSiteSupplierFactory is targeting JDK 8, it uses sun.misc.SharedSecrets which is unavailable on Java 9+ Current GraalVM 22.3.1 provides Java 11/17/19-based GraalVM https://www.graalvm.org/release-notes/22_3/ Fixes #3334
Thank you very much. 👍 Version 3.5.3 works on my side. |
While updating
io.projectreactor reactor-core
from version 3.5.1 to 3.5.2, the following error occurs in my showcase-quarkus-eventsourcing GraalVM native image build (Java 17):References:
native-image
folderExpected Behavior
Succeeding native image build for Java 17 that isn't influenced by features that aren't used.
Actual Behavior
Native image build fails because of missing
sun.misc.SharedSecrets
that weren't needed prior to version 3.5.2. I suspect the newly added reflect-config.json, but am not sure why this is the case.Steps to Reproduce
See Failed Build Log.
Or checkout showcase-quarkus-eventsourcing branch renovate/patch-reactor-core.version and follow the instructions to build the native image.
Possible Solution
I tried to change my reflection-config.json and the --exclude-config. Both didn't work. I'll continue trying.
Would it be possible to find an alternative to the use of
sun.misc.SharedSecrets
? Or is there a configuration or a dependency that can be added by users of this library to get it to work with Java 17?Your Environment
netty
, ...): GraalVM version 22.3.0java -version
): Java 17uname -a
): Ubuntu latestThe text was updated successfully, but these errors were encountered: