Description
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):
Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: sun.misc.SharedSecrets. This error is reported at image build time because class reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException is registered for linking at image build time by command line
[493](https://github.com/JohT/showcase-quarkus-eventsourcing/actions/runs/3899597517/jobs/6659395744#step:6:494)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.reportUnresolvedElement(SharedGraphBuilderPhase.java:333)
References:
- Failed Build Log
- Version Update Merge Request
- Related reactor-core commit
- Native image build configuration with
native-image
folder
Expected 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
- Reactor version(s) used:3.5.2
- Other relevant libraries versions (eg.
netty
, ...): GraalVM version 22.3.0 - JVM version (
java -version
): Java 17 - OS and version (eg
uname -a
): Ubuntu latest - Further details see my pipeline configuration