Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin bean instantiation regression with default declared constructor [SPR-15851] #20406

spring-issuemaster opened this issue Aug 7, 2017 · 0 comments


None yet
2 participants
Copy link

commented Aug 7, 2017

Lewis opened SPR-15851 and commented

#20232 is the original report of the issue.

With Spring Boot 2.0 M3:

class FooProperties(
    var bar: String = "bar",
    var baz: Int = 1

Generates this stacktrace:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate []: No corresponding Kotlin constructor found
        at org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass( ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
        at org.springframework.beans.BeanUtils.instantiateClass( ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
        at ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]

Affects: 5.0 RC3

Issue Links:

  • #20232 Kotlin class instantiation with optional parameters and default values

Referenced from: commits ef175d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.