-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Native Image broken after upgrade to 3.0.6 - MissingResourceException: Can't find bundle for base name org.aspectj.weaver.weaver-messages #35104
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
Comments
In the meantime, you can configure the GraalVM native image to pick up the prior release version of the reachability metadata repository. Version 0.2.6 is the prior version that may have previously been working for you. Alternatively, you can target specific hint versions for individual dependencies. |
I haven't tried that yet, but I don't think that'll help. The aspectj library doesn't seem to be part of GraalVM's metadata repository. |
You need to tell the GraalVM compiler that it should include the file it's looking for at compile time. Create {
"resources":
{
"includes":
[
{
"pattern": "\\Qorg/aspectj/weaver/weaver-messages.properties\\E"
}
]
}
} That will likely get you past that error - but then potentially onto the next one. Nature of the game :) Same story for reflection, dynamic class loading, and proxies. Have to tell GraalVM native image compiler about them in advance. I've become more familiar with the tracing agent - huge help. Run it once, and then use it's output to search for the hints - for the classes/files you get errors about, then pull the needed hint(s) into your own set. |
Then - you can also come more correct when reporting issue, with what hints you added to fix the problem - so the Spring Boot team can add them if needed. On that note - a small bare-bones reproducer project will likely be asked of you if you want someone else to go through this stuff instead. |
Spring Boot doesn't provide any hints for AspectJ so I'm not sure why this worked previously. Perhaps something else was providing the necessary hints either intentionally or through an accidentally too-broad pattern. A minimal example should help us to track down why this worked before so that we can identify the right place for a fix. Can you please provide one, @lambliesdown? |
Just realized that my issue is pretty much the same as #35049. |
Thanks for letting us know, @lambliesdown. |
After an upgrade from 3.0.5 to 3.0.6 yesterday, our natively compiled applications are failing to start. Apparently the resource org.aspectj.weaver.weaver-messages is not included automatically anymore. After adding the resource explicitly with a ResourceHint, the startup gets beyond this point but has other issues later (will submit separate issue for that).
Things worked perfectly fine without any special ResourceHint with 3.0.x up to 3.0.5.
Using the Gradle plugin org.graalvm.buildtools.native - version 0.9.20
See attached stacktrace.
stacktrace.txt
The text was updated successfully, but these errors were encountered: