Hello SpringBoot team,

Just wanted to reach out again regarding SpringBoot 3.3.0-RC1, GraalVM 22 to build a native image.

With this out of the box from Spring Initializer demo (please see zip file)

issue.zip

Just by adding the lines to the maven plugin, and running this command mvn -Pnative spring-boot:build-image:

<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <image>
                        <env>
                            <BP_JVM_VERSION>22</BP_JVM_VERSION>
                        </env>
                    </image>
                </configuration>
            </plugin>

This issue is reproduced 100% at the time.

[INFO]     [creator]     Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: An object of type 'org.springframework.boot.loader.nio.file.NestedFileSystemProvider' was found in the image heap. This type, however, is marked for initialization at image run time for the following reason: classes are initialized at run time by default.
[INFO]     [creator]     This is not allowed for correctness reasons: All objects that are stored in the image heap must be initialized at build time.
[INFO]    

While SpringBoot team believes this is a buildpacks issue, buildpacks team believes it is a SpringBoot issue.

I am like a ping pong ball between two bigger entities.

Is it possible SpringBoot team helps take a look at this SpringBoot class which seems to be causing the issue? org.springframework.boot.loader.nio.file.NestedFileSystemProvider

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/nio/file/NestedFileSystemProvider.java#L51

Thank you for your help.

Comment From: wilkinsona

Please don't deliberately create duplicate issues. https://github.com/paketo-buildpacks/native-image/issues/321 remains open where you're already receiving some assistance and suggestions for how to further diagnose the problem. I'm already subscribed to that issue. If it turns out that it is a Spring Boot issue, we can re-open https://github.com/spring-projects/spring-boot/issues/40570.