Skip to content

AOT processing fails when a @ConfigurationProperties-annotated record has multiple constructors #37283

@adamkubon

Description

@adamkubon

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

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

Metadata

Metadata

Assignees

Labels

theme: aotAn issue related to Ahead-of-time processingtype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions