-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
Using Quarkus 3.4.1
and GraalVM CE 21+35.1, it's not possible to naively compile an application with the property quarkus.native.auto-service-loader-registration=true
. The following exception is thrown:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/remerson/Programs/graalvm-community-openjdk-21+35.1/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dlogging.initial-configurator.min-level=500 -J-Duser.language=en -J-Duser.country=GB -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.DisableLoggingFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+UnlockExperimentalVMOptions -H:BuildOutputJSONFile=reproducer-1.0-SNAPSHOT-runner-build-output-stats.json -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+AllowFoldMethods -H:-UnlockExperimentalVMOptions -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+UnlockExperimentalVMOptions -H:+ReportExceptionStackTraces -H:-UnlockExperimentalVMOptions -H:-AddAllCharsets --enable-url-protocols=http -H:NativeLinkerOption=-no-pie -H:+UnlockExperimentalVMOptions -H:+UseServiceLoaderFeature -H:-UnlockExperimentalVMOptions -H:+TraceServiceLoaderFeature -J--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl=ALL-UNNAMED reproducer-1.0-SNAPSHOT-runner -jar reproducer-1.0-SNAPSHOT-runner.jar
Warning: The option '-H:+TraceServiceLoaderFeature' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
Warning: Please re-evaluate whether any experimental option is required, and either remove or unlock it. The build output lists all active experimental options, including where they come from and possible alternatives. If you think an experimental option should be considered as stable, please file an issue.
Error: Could not find option 'TraceServiceLoaderFeature' from 'user'. Did you mean one of these: ServiceLoaderFeatureExcludeServiceProviders ServiceLoaderFeatureExcludeServices UseServiceLoaderFeature. Use -H:PrintFlags= to list all available options.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
- Define
quarkus.native.auto-service-loader-registration=true
in application.properties - Build the application with
mvn clean install -Pnative
https://github.com/ryanemerson/TraceServiceLoaderFeatureReproducer
Output of uname -a
or ver
Linux fedora 6.2.15-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 11 16:51:53 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
No response
GraalVM version (if different from Java)
openjdk version "21" 2023-09-19 OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15) OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
Quarkus version or git rev
3.4.1
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8) Maven home: /home/remerson/Programs/apache-maven-3.9.1 Java version: 21, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-21 Default locale: en_GB, platform encoding: UTF-8 OS name: "linux", version: "6.2.15-100.fc36.x86_64", arch: "amd64", family: "unix"
Additional information
No response