-
Notifications
You must be signed in to change notification settings - Fork 350
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
Upgrading to Spring Data JDBC 2.1.3 results in ConverterNotFoundException for String to Duration #959
Comments
I strongly suspect this is a duplicate of spring-projects/spring-data-commons#2223 You should be able to fix this by registering some custom conversion for the conversion from |
Attaching stack trace:
|
We should properly support the JSR310 converters in Spring Data JDBC. This is probably already fixed by #937 for the current master |
Thanks for looking into this!
I was hoping I wouldn't have to! :)
I see that this PR is included in Spring Data 2021.0.0, so I've tested with Spring Boot 2.5.0-RC1 (which includes 2012.0.0) and the issue is resolved. Thanks! |
Closing this as a duplicate of #937 |
I have a Spring Data repository that returns an object with a Duration field which is stored in the database as a String. In Spring Data JDBC 2.1.2 the object is created and returned successfully. After upgrading to Spring Data JDBC 2.1.3, the following exception is thrown:
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.time.Duration]
I've created a project that demonstrates the issue here: https://github.com/dmkeen/spring-boot-2.4.2-issue
Because the issue presented itself when upgrading Spring Boot, I filed an issue there first. Scott Frederick helped narrow down the problem - please see his analysis here: spring-projects/spring-boot#25878.
The text was updated successfully, but these errors were encountered: