Skip to content

Spring and Quarkus: Resolve warnings - #6884

Merged
lihaoyi merged 5 commits into
com-lihaoyi:mainfrom
vaslabs-ltd:spring-and-quarkus-warnings
Feb 26, 2026
Merged

lihaoyi merged 5 commits into
com-lihaoyi:mainfrom
vaslabs-ltd:spring-and-quarkus-warnings

Conversation

@souvlakias

@souvlakias souvlakias commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

Resolves the following warnings:

Spring-Native

11112] Warning: The option '-H:IncludeResources=application.properties|META-INF|META-INF/native-image|META-INF/native-image/unspecified|META-INF/native-image/unspecified/spring-boot-native-demo|META-INF/native-image/unspecified/spring-boot-native-demo/native-image.properties|META-INF/native-image/unspecified/spring-boot-native-demo/resource-config.json|META-INF/native-image/unspecified/spring-boot-native-demo/reflect-config.json' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
11112] 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.

Since the way we include resources is experimental, add the suggested -H:+UnlockExperimentalVMOptions option in the examples
Closes #6831

Quarkus tests

1-143] WARN: Could not get access to jdk.internal.module API: this is required for Quarkus to adjust Java Modules configuration to match the various requirements of each extension. Please ensure this JVM is launched with --add-opens=java.base/java.lang.invoke=ALL-UNNAMED.
1-143] Feb 25, 2026 6:58:06 PM org.jboss.logmanager.JBossLoggerFinder getLogger
1-143] ERROR: The LogManager accessed before the "java.util.logging.manager" system property was set to "org.jboss.logmanager.LogManager". Results may be unexpected.
1-143] WARNING: A Java agent has been loaded dynamically (/home/styl/.cache/coursier/v1/https/repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.17.8/byte-buddy-agent-1.17.8.jar)
1-143] WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
1-143] WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
1-143] WARNING: Dynamic loading of agents will be disallowed by default in a future release

Noticed that Gradle and Maven plugins add the following: (ref)

- systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
- jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
- jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
- jvmArgs("--add-exports=java.base/jdk.internal.module=ALL-UNNAMED")

So added these to the test's forkArgs

@vaslabs

vaslabs commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor

Are these settings version/application specific? Maybe they should just go in the examples

EDIT: I guess, to increase confidence, let's check if these are used in the other plugins and point to them. If not, documenting them in the examples should be good enough

@souvlakias

souvlakias commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Are these settings version/application specific? Maybe they should just go in the examples

EDIT: I guess, to increase confidence, let's check if these are used in the other plugins and point to them. If not, documenting them in the examples should be good enough

Thanks,

/**
 * Test that verifies the Quarkus Gradle plugin properly configures JVM arguments and system property
 * for test execution, specifically:
 * - systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
 * - jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
 * - jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
 * - jvmArgs("--add-exports=java.base/jdk.internal.module=ALL-UNNAMED")
 */

So will keep these in default test forkArgs

@vaslabs

vaslabs commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Are these settings version/application specific? Maybe they should just go in the examples
EDIT: I guess, to increase confidence, let's check if these are used in the other plugins and point to them. If not, documenting them in the examples should be good enough

Thanks,

/**
 * Test that verifies the Quarkus Gradle plugin properly configures JVM arguments and system property
 * for test execution, specifically:
 * - systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
 * - jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
 * - jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
 * - jvmArgs("--add-exports=java.base/jdk.internal.module=ALL-UNNAMED")
 */

So will keep these in default test forkArgs

nice find, yes, let's replicate that behaviour in quarkus

@souvlakias

Copy link
Copy Markdown
Contributor Author

In javalib spring native example, one warning remains:

1-144] native.nativeImage
1-144] Warning: Using a deprecated option --report-unsupported-elements-at-runtime from 'META-INF/native-image/unspecified/spring-boot-native-demo/native-image.properties' in 'file:///home/styl/projects/mill/example/javalib/springboot/6-native/out/springBootProcessAOT.dest/resources/'. The option is deprecated and will be removed in the future. The use of unsupported elements is always reported at run time.

This comes from a generated file from springBootProcessAOT though, so it depends on the spring version we use I guess

@vaslabs

vaslabs commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

In javalib spring native example, one warning remains:

1-144] native.nativeImage
1-144] Warning: Using a deprecated option --report-unsupported-elements-at-runtime from 'META-INF/native-image/unspecified/spring-boot-native-demo/native-image.properties' in 'file:///home/styl/projects/mill/example/javalib/springboot/6-native/out/springBootProcessAOT.dest/resources/'. The option is deprecated and will be removed in the future. The use of unsupported elements is always reported at run time.

This comes from a generated file from springBootProcessAOT though, so it depends on the spring version we use I guess

if this argument is not from us, then it's fine, must be something internal

@vaslabs

vaslabs commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Lgtm

@souvlakias
souvlakias marked this pull request as ready for review February 26, 2026 20:09
@lihaoyi
lihaoyi merged commit 98f1bfe into com-lihaoyi:main Feb 26, 2026
46 checks passed
@lefou lefou added this to the 1.1.3 milestone Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spring Boot Native warnings

4 participants