-
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
Quarkus 3.10.0
now requires a GraalVM installation for quarkusDev when quarkus.native.enabled
is set to true
#40495
Comments
3.10.0
now requires a GraalVM installation when quarkus.native.enabled
is set to true3.10.0
now requires a GraalVM installation for quarkusDev when quarkus.native.enabled
is set to true
I think this was indirectly caused by #39295. On reaugment, the dev mode processor forces the JAR type to be The interim workaround would be to set |
Fixes quarkusio#40495 (cherry picked from commit 5370e59)
Hi @dmlloyd @geoand, the issue still persists in Quarkus 3.10.1+, the PR did not fix the issue in combination with Quarkus AWT. I just tried again with Quarkus 3.11.3 and there I get the following error. 024-06-25 13:47:17,060 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.awt.deployment.AwtProcessor#setupJava2DClasses threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.awt.deployment.AwtProcessor.setupJava2DClasses(AwtProcessor.java:153)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunnerError.getGraalVMVersionCommand(NativeImageBuildRunnerError.java:21)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:29)
... 11 more
[error]: Build step io.quarkus.awt.deployment.AwtProcessor#setupAWTInit threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.awt.deployment.AwtProcessor.setupAWTInit(AwtProcessor.java:121)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunnerError.getGraalVMVersionCommand(NativeImageBuildRunnerError.java:21)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:29)
... 11 more
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:58)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:113)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:435)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:56)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:138)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.awt.deployment.AwtProcessor#setupJava2DClasses threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.awt.deployment.AwtProcessor.setupJava2DClasses(AwtProcessor.java:153)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunnerError.getGraalVMVersionCommand(NativeImageBuildRunnerError.java:21)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:29)
... 11 more
[error]: Build step io.quarkus.awt.deployment.AwtProcessor#setupAWTInit threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.awt.deployment.AwtProcessor.setupAWTInit(AwtProcessor.java:121)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunnerError.getGraalVMVersionCommand(NativeImageBuildRunnerError.java:21)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:29)
... 11 more
at io.quarkus.builder.Execution.run(Execution.java:123)
at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:327)
... 9 more
Suppressed: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.awt.deployment.AwtProcessor.setupAWTInit(AwtProcessor.java:121)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunnerError.getGraalVMVersionCommand(NativeImageBuildRunnerError.java:21)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:29)
... 11 more
Caused by: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.awt.deployment.AwtProcessor.setupJava2DClasses(AwtProcessor.java:153)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunnerError.getGraalVMVersionCommand(NativeImageBuildRunnerError.java:21)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:29)
... 11 more |
Can you please attach a sample project that fails as you describe? Thanks |
Hello Georgios, we don't need any sophisticated reproducer, I did not try with Maven, but I guess there we will get the exact same error. I hope this helps! |
Hi, I tried with both Quarkus |
@geoand remove your |
I did, still works |
I just launched a fresh Windows 11 Sandbox, installed Eclipse Temurin 21, set the The same issue appears if I try the Maven code starter. |
I don't have a Windows machine unfortunately... |
I will try with a fresh WSL instance, maybe I can reproduce this also in a Linux distro. |
Very interesting find! |
Nevermind, it also does not work under Linux, I just forgot to add It is almost the same error, this time the stack trace from the GraalVM build -> container runtime detection. You must do something different when you try to reproduce this @geoand as I also get the same error under Linux. |
I've never been able to reproduce that, so best if someone else gives it a shot |
It also does not matter if I add quarkus.package.jar.enabled=true
quarkus.native.enabled=true https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.10#packaging-configuration-gear-white_check_mark quarkus.package.jar.enabled=false
quarkus.native.enabled=true So we have a clear behavior change here regarding the AWT usage. |
@geoand I was able to reproduce the issue (with 3.12.0) by:
quarkus.native.enabled=true
quarkus.package.jar.enabled=false
quarkus.native.container-build=false |
Thanks @zakkak, I can now reproduce the problem. This is actually rather serious... There are a few solutions I can think of, but none of them are great... |
In |
Very likely |
Is this fixed in Quarkus 3.13.X? |
Let's close for now. If it's still a problem, please mention it and we can reopen |
Describe the bug
When upgrading Quarkus from a previous version to Quarkus
3.10.0
, the Quarkus CLI migratesquarkus.package.type=native
to
With this change, the dev server
./gradleq quarkusDev
can no longer start if any other OpenJDK distribution instead of GraalVM is installed.With previous versions this worked, as for local development for example Eclipse Adoptium is sufficient and building and testing in native mode is only done by the CI pipeline.
Expected behavior
The local dev server
./gradleq quarkusDev
should work if the following properties are set without GraalVM installed.Actual behavior
How to Reproduce?
No response
Output of
uname -a
orver
Microsoft Windows [Version 10.0.22631.3447]
Output of
java -version
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
Quarkus version or git rev
3.10.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.7
Additional information
The text was updated successfully, but these errors were encountered: