Closed as not planned
Description
Hi,
I haven't touched spring-native for a few years, and it seems to be broken even more than it used to be.
While trying to solve other related problems, I tried to run a demo app from scratch, which failed drastically.
Set up:
- start.spring.io
- maven, boot 3.1.0, java, jar, 17
- dependencies: graalvm, configuration processor, devtools, lombok, jpa, validation
Outcome:
- Jar runs fine
- Native image doesn't:
:: Spring Boot :: (v3.1.0)
15:17:49.314 [main] ERROR org.springframework.boot.SpringApplication -- Application run failed
java.lang.IllegalArgumentException: Could not find class [com.example.demo.DemoApplication__ApplicationContextInitializer]
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:334)
at org.springframework.context.aot.AotApplicationContextInitializer.instantiateInitializer(AotApplicationContextInitializer.java:80)
at org.springframework.context.aot.AotApplicationContextInitializer.initialize(AotApplicationContextInitializer.java:71)
at org.springframework.context.aot.AotApplicationContextInitializer.lambda$forInitializerClasses$0(AotApplicationContextInitializer.java:61)
at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:606)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:310)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1305)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1294)
at com.example.demo.DemoApplication.main(DemoApplication.java:10)
Caused by: java.lang.ClassNotFoundException: com.example.demo.DemoApplication__ApplicationContextInitializer
at [email protected]/java.lang.Class.forName(DynamicHub.java:1132)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:324)
... 9 common frames omitted
I tried using spring-core 6.0.10-SNAPSHOT as has been suggested here, with no luck.
I have published the sources so you can save some time to reproduce the issue: here