Describe the Issue
After upgrading SpringBoot from 3.5.x to 4.0.x I can no longer native-compile the application. The error is:
Fatal error: com.oracle.svm.core.util.VMError$HostedError: Bulk queries can only be set with 'name' which does not allow run-time conditions.
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
java 25.0.2 2026-01-20 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 25.0.2+10.1 (build 25.0.2+10-LTS-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 25.0.2+10.1 (build 25.0.2+10-LTS-jvmci-b01, mixed mode, sharing)
Operating System and Version
Ubuntu 24.04.6 under WSL2
Build Command
mvn clean package
Expected Behavior
The application native-compiles successfully
Actual Behavior
The compilation fails with an VMError
Steps to Reproduce
- Clone the repository and checkout the branch: https://github.com/mnowrot/graal-vm-and-spring-boot/tree/native-build-issue
- Run
Additional Context
No response
Build Log Output and Error Messages
```
Fatal error: com.oracle.svm.core.util.VMError$HostedError: Bulk queries can only be set with 'name' which does not allow run-time conditions.
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:78)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.guarantee(VMError.java:122)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.guaranteeNotRuntimeConditionForQueries(ReflectionDataBuilder.java:256)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerAllFieldsQuery(ReflectionDataBuilder.java:563)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerClassMetadata(ReflectionDataBuilder.java:237)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.lambda$register$1(ReflectionDataBuilder.java:211)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.lambda$runConditionalInAnalysisTask$1(ReflectionDataBuilder.java:190)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:166)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:152)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1750)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1742)
at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1659)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
```
Describe the Issue
After upgrading SpringBoot from 3.5.x to 4.0.x I can no longer native-compile the application. The error is:
Fatal error: com.oracle.svm.core.util.VMError$HostedError: Bulk queries can only be set with 'name' which does not allow run-time conditions.Using the latest version of GraalVM can resolve many issues.
GraalVM Version
Operating System and Version
Ubuntu 24.04.6 under WSL2
Build Command
mvn clean package
Expected Behavior
The application native-compiles successfully
Actual Behavior
The compilation fails with an VMError
Steps to Reproduce
Additional Context
No response
Build Log Output and Error Messages