-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
HotSpot mode NoClassDefFoundError: org/graalvm/nativeimage/ImageInfo #30998
Comments
So the issue seems to be that you are building a runner jar for native compilation and then try to run it in JVM-mode with HotSpot. I guess running the runner jar makes sense when testing. I wonder if it would be acceptable to have to use GraalVM in such cases? Probably not, since in the common case it's expected to use a builder image and thus not have GraalVM locally installed making it hard to run the jar with GraalVM instead of HotSpot. |
@zakkak I admit my use case is, similarly to apache/camel-quarkus#4218, a testing one, not a production deploy one. The trouble I perceive is that we would like people to have well tested JVM mode Quarkus app that they can built into a native executable without too many surprises. Enforcing separate build flows seems like a bad workflow for me (to me too). I would like to run the build once, getting both runnable jar and a native executable. I can then run tests, see that the behavior of those two apps is adequately similar and then I can deploy the native app. I don't want to run another build for that, introducing more possible maven entropy... |
PR introducing the change (for reference) : #28650 |
I am afraid what you wish for might not be actually what you want :)
I see where you are coming from, but keep in mind that the runners produced for native compilation are different to the runners produced for JVM-mode use. The main difference is that the ones targeting native compilation come with more native-related stuff included (e.g. substitution classes, reflection configurations, etc.), in the past they also used to be packaged differently (fat jars vs thin jars) not sure if that's still the case.
Not sure how we could achieve this without adding bloat to the regular builds or without introducing possibly unnecessary build-time overheads for native builds. cc @geoand @Sanne for feedback |
Yeah, we don't really want to do this. As @zakkak mentioned, the jar for JVM mode is as lean as possible and the jar that serves the purpose of being fed into native-image is also tailor made to help with native image compilation. I personally see no reason we would provide the same artifact for both scenarios and honestly no one has complained in the 3+ years we have been doing things the way we have. |
I am cool with having to call a different runnable jar in a different subdir. Btw I am not calling
I also don't have a PR handy right now, yet it seem to me this is something we should give a second thought to. I would like to enable users to create a native executable and a runnable jar with a single Maven build. |
I am not asking for having a single jar artifact to be both the runnable one and to be the one fed to native-image. My point is about not having to run another Maven build. |
It's doable, no doubt. But no one has asked for it, so I would refrain for adding this capability until we have a real need. |
Furthermore, this would complicate other things like:
as you know have to figure out which artifact to perform these operations for... |
Describe the bug
I have this MicroProfile smoke test Quarkus app that used to work the way I build it both in Native and in JVM mode. It seems that the JVM (HotSpot) mode of running a jar is broken, with Q 2.16.0 and 2.16.1 too.
It might be something no longer compatible in the pom, old maven, deprecated way of treating the app, no necessarily a bug.I do realize this is unlikely to be a Quarkus bug as a whole CI hell would have been loose otherwise already.
It's #28650
Expected behavior
Both native and JVM mode work.
Actual behavior
JVM mode is missing org.graalvm.sdk.graal-sdk?
How to Reproduce?
Env
2.13.7 ✔️
2.16.1 ❌
Ad SDK jar: No org.graalvm.sdk.graal-sdk-22.3.0 for 2.16:
Output of
uname -a
orver
Linux amd64
Output of
java -version
17.0.6
GraalVM version (if different from Java)
22.3.1.0
Quarkus version or git rev
2.16.1, 2.13.7
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.6.3
Additional information
No response
The text was updated successfully, but these errors were encountered: