You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These changes will bring more predictability and consistency when it comes to reachability metadata, as discussed in the proposal. Metadata produced by Spring should be complete and avoid relying on unspecified behavior of the native-image at runtime.
Running a Spring application with a GraalVM dev build and the following options:
graalvmNative {
binaries {
main {
quickBuild = true
buildArgs.add('-H:+UnlockExperimentalVMOptions') // see https://github.com/oracle/graal/issues/7105
buildArgs.add('-H:ThrowMissingRegistrationErrors=')
buildArgs.add('-H:MissingRegistrationReportingMode=Warn')
}
}
}
will show warnings in the logs, such as:
org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively access org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer.getConstructors() without it being registered for runtime reflection. Add org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer.getConstructors() to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.
java.base@21/java.lang.Class.getConstructors(DynamicHub.java:1010)
org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findConstructor(SpringFactoriesLoader.java:405)
org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.forClass(SpringFactoriesLoader.java:394)
org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:227)
This is an umbrella issue that will track efforts in the Spring Framework to fix and update the reachability metadata produced during the AOT phase to prepare for the upcoming GraalVM release. Dedicated issues and PRs will be created against other Spring projects if needed. For 3rd party dependencies, we'll turn to the reachability metadata repository.
Closing this umbrella issue as a first round of improvements. We will refine this with further changes in 6.1.x if needed, as soon as new GraalVM dev builds are shipped with relevant changes.
The GraalVM team has been working on reporting missing reachability metadata as exceptions at runtime. Relevant changes have been contributed to recent builds with oracle/graal#7179 or oracle/graal#6139.
These changes will bring more predictability and consistency when it comes to reachability metadata, as discussed in the proposal. Metadata produced by Spring should be complete and avoid relying on unspecified behavior of the native-image at runtime.
Running a Spring application with a GraalVM dev build and the following options:
will show warnings in the logs, such as:
This is an umbrella issue that will track efforts in the Spring Framework to fix and update the reachability metadata produced during the AOT phase to prepare for the upcoming GraalVM release. Dedicated issues and PRs will be created against other Spring projects if needed. For 3rd party dependencies, we'll turn to the reachability metadata repository.
The text was updated successfully, but these errors were encountered: