Hi, I'm trying to compile a native image for Java compiler and got error.
[INFO] --- quarkus-maven-plugin:0.15.0:native-image (default) @ getting-started ---
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] Running Quarkus native-image plugin on OpenJDK GraalVM CE 19.0.0
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] /usr/local/lib/graalvm-ce-19.0.0/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar getting-started-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:+PrintAnalysisCallTree -H:-AddAllCharsets -H:EnableURLProtocols=http -H:NativeLinkerOption=-no-pie -H:-SpawnIsolates -H:-JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace
[getting-started-1.0-SNAPSHOT-runner:4627] classlist: 4,541.28 ms
[getting-started-1.0-SNAPSHOT-runner:4627] setup: 473.59 ms
Error: Already registered: java.lang.reflect.Method.getDefaultValue()
com.oracle.svm.core.util.UserError$UserException: Already registered: java.lang.reflect.Method.getDefaultValue()
at com.oracle.svm.core.util.UserError.abort(UserError.java:65)
at com.oracle.svm.core.util.UserError.guarantee(UserError.java:86)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.register(AnnotationSubstitutionProcessor.java:710)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:334)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:298)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:274)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:230)
at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:864)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:819)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:521)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:441)
at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error: Image build request failed with exit status 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.737 s
[INFO] Finished at: 2019-05-15T15:38:37+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.15.0:native-image (default) on project getting-started: Failed to generate a native image: Failed to build native image: Image generation failed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
For reproducing please run ./mvnw package -Pnative in the https://github.com/quarkusio/quarkus-quckstarts folder getstarted
I'm on ubuntu with graalvm-ce 19.0.0
Quarkus only supports GraalVM RC16 right now. We'll give an update when 19.0.0 is supported.
Ok. Thanks for the quick answer
Sorry, I forgot to update. The latest couple of Quarkus releases run well on GraalVM 19.0.2.
See https://quarkus.io/blog/quarkus-0-19.1-released/ for more info.
Most helpful comment
Quarkus only supports GraalVM RC16 right now. We'll give an update when 19.0.0 is supported.