-
Notifications
You must be signed in to change notification settings - Fork 41.9k
AOT processing fails when a @ConfigurationProperties-annotated record has multiple constructors #37283
Copy link
Copy link
Closed
Labels
theme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug
Milestone
Description
Bug description
Native compilation AOT step fails for native compilation on @ConfigurationProperty of record type enabled by @EnableConfigurationProperty
I observed that the definition of second constructor for property class(record) causing compilation error.
Exception in thread "main" java.lang.IllegalStateException: No constructor or factory method candidate found for Root bean: class [com.example.graalvmdemo.config.RecordProperties]; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodNames=null; destroyMethodNames=null and argument types []
Bug reproduce
-
Use following dummy app: https://github.com/adamkubon/graalvm-demo
-
command used to compile the project
# mvn clean install -DskipTests; mvn -Pnative native:compile -DskipTests
Expected behaviour
No error during compilation
System info
- Ubuntu 22.04.3 LTS (hosted on vmware)
- GraalVM Version 17.0.8-graalce (installed by sdkman)
- Java Version 17
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
theme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug