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
It looks like we have uncovered a potential GraalVM bug that breaks Spring Boot 3.0.6+ application using Spring beans that are records, which is a pretty propular use cases with @ConfigurationProperties. The related Spring Framework issue is spring-projects/spring-framework#30383, and it looks like a record specific follow-up of #5139 cc @cstancu@loicottet.
This regression has been cause by an IMO legit Spring Framework refinement that adds "queryAllDeclaredMethods": true on all beans for 2 reasons:
It is by design required if we want properly to support init/destroy methods
It will improve the compatiblity with upcoming GraalVM reflection support changes
Fatal error: com.oracle.svm.core.util.VMError$HostedError: com.oracle.svm.core.util.VMError$HostedError: New Method or Constructor found as reachable after static analysis: public java.lang.String com.example.SampleConfigurationProperties.message()
As part of spring-projects/spring-framework#30383 and since this is a blocking issue, we will likely workaround by adding invocation metadata which works:
After b374824 related
to gh-29246, `"queryAllDeclaredMethods": true` is now added
on all registered beans.
This legit change triggers oracle/graal#6510. This
commit workarounds this GraalVM bug, and should be
removed once the GraalVM fix has reached a wide enough
audience.
Closesgh-30383
It looks like we have uncovered a potential GraalVM bug that breaks Spring Boot 3.0.6+ application using Spring beans that are records, which is a pretty propular use cases with
@ConfigurationProperties
. The related Spring Framework issue is spring-projects/spring-framework#30383, and it looks like a record specific follow-up of #5139 cc @cstancu @loicottet.This regression has been cause by an IMO legit Spring Framework refinement that adds
"queryAllDeclaredMethods": true
on all beans for 2 reasons:So this works:
And this fails:
With the following error:
Can be reproduced with https://github.com/sdeleuze/demo-profile-aot when updating to Boot 3.0.6.
As part of spring-projects/spring-framework#30383 and since this is a blocking issue, we will likely workaround by adding invocation metadata which works:
Could you please fix this and backport it to GraalVM 22.3.x maintenance release?
The text was updated successfully, but these errors were encountered: