-
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
Spring Boot 3 Native Needs RomeTools and Kotlin Serialization JARs. #32915
Comments
What version of GraalVM are you using? We require 22.3 and have seen obscure Kotlin-related error messages with 22.2. |
Ah good point, should have mentioned it. I was using |
Reproduced using GraalVM 22.3.0: java.lang.TypeNotPresentException: Type com.rometools.rome.feed.WireFeed not present java -version native-image --version |
Sounds like you have a different problem, @eugeniace. @akefirad confirmed above that upgrading to 22.3 fixed their problem. If you would like us to investigate, please open a new issue providing a minimal sample that reproduces the problem that you're seeing. |
Should I check anything else beside the commands from above? I have installed on my Windows laptop also older versions of GraalVM or Liberica. |
Those versions look fine to me. As I said above, if you would like us to investigate, please open a new issue providing a minimal sample that reproduces the problem that you're seeing. |
I can reproduce this on a Mac (Intel and M1) and Linux with GraalVM 22.3 as well, using Boot 3.0.1 |
@ddobrin Can you please provide a sample application if you have one that shows the problem. |
@philwebb : openjdk version "17.0.5" 2022-10-18 The service uses Google Native Java Client Libraries and accesses Vision and Firestore; uses the latest Google BOM. Native image builds and works fine when adding rometools & kotlinx: Without the added dependencies, it can be built with the Java agent, collect the generated *.json files, copy them to src/main/resources/META-INF and build the native image, which will fail with: Fatal error: java.lang.NullPointerException: Cannot invoke "jdk.vm.ci.meta.JavaField.format(String)" because "field" is null These dependency requirements did not exist in Boot 3 M5, however libraries have evolved since. |
Thanks for the repro, @ddobrin. I can reproduce this on an Intel Mac too. It looks to be the same problem as oracle/graal#5318 which was fixed in Graal 22.3. Can you please open a Graal issue so that they can investigate? If you comment here with a link to it, we can keep an eye on it and provide any input that may be needed from our side. |
Thank you @wilkinsona. Created a new issue in Graal, linked the old issue and this one, provided the repro. New issue: Reopen Graal issue #5318 - not fixed in 22.3 or 23.0 dev |
Thanks, @ddobrin. I've subscribed to the Graal issue. I'll close this one for now but we can re-open it if the Graal team discover that there are some changes to make on the Boot side of things. |
Bug Report for Spring Boot 3 Native
I'm not sure if this is a bug or lack of documentation? (I couldn't find anything on how to solve this issue).
Having a simple spring boot application (generated on start.spring.io), building the native image is failing due to missing dependencies; kotlinx-serialization and remotetools. Adding the following dependencies would resolve the issue:
The exact error messages are (sometimes it's complaining about another class):
If I'm not mistaken having
--allow-incomplete-classpath
should help with this (please correct me if I'm wrong). But firstly I don't know how to do it (where to add the switch) and secondly is this really the right solution? Thanks.The text was updated successfully, but these errors were encountered: