-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Migrate from spring boot 3.1.5 to 3.2 native image java.util.MissingResourceException #38257
Comments
Thanks for trying to RC. Spring Boot itself doesn't do anything to make AspectJ's resource bundle available in a native image. That's the responsibility of AspectJ itself (if they choose to support Graal directly) or of the reachability metadata. I would guess that something in your application or its dependencies was providing the necessary hints to Graal to make the resource bundle available and is now no longer doing so. I can't tell what that may have been from the stack trace of the failure. It may be possible from a minimal sample that works with 3.1.5 and fails with 3.2.0-RC2. In the meantime you could add such a hint yourself. |
it looks like it happens when i add annotation of |
Simple project to reproduce the problem, |
Spring Data JPA could do that but we don't think it's the best approach, certainly not in the long run. In terms of maintainability and benefit to the GraalVM ecosystem as a whole, we think it's better for a project to manage its own GraalVM-related hints. In this case, it's AspectJ that requires access to its message bundle so, ideally, AspectJ would provide the necessary hints. When that hasn't been done, the reachability metadata repository is the next-best option as it allows anyone who is using AspectJ with GraalVM to benefit.
Thanks for the sample. I've reproduced the failure described above. Interestingly, if I change build.gradle to set
The cause of this error isn't clear to me. It looks like it may be due to AspectJ being unable to extract some information about a pointcut but that's not much more than a slightly educated guess. Given that the problem only occurs with |
FWIW, here's the related ticket to add native runtime hints for AspectJ: eclipse-aspectj/aspectj#227 |
We have a working application running on spring boot 3.1.5 using java 21 as a native image and everything works ok
we are trying to upgrade that application to 3.2.0-RC2 to get the benefit of project loom and get prepared for GA release but we see some issue
When we migrate to spring boot 3.2.0-RC2 and upgrade the native build tool to 0.9.28 we get the following error
The text was updated successfully, but these errors were encountered: