[DATACMNS-1594] Warning logs for JodaTime converters when using spring-boot-gcp-starter Created: 21/Oct/19  Updated: 21/Oct/19

Status: Waiting for Feedback
Project: Spring Data Commons
Component/s: Core
Affects Version/s: 2.2 GA (Moore)
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Bjorn Harvold Assignee: Oliver Drotbohm
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive spring-data-joda-errors.zip     Zip Archive spring-data-joda-errors_1.1.X.zip    
Last updater: Bjorn Harvold

 Description   

The dependency spring-boot-gcp-starter brings with it Joda Time module causing Spring Data MongoDb to emit converter warnings

Created simple starter project to replicate. See attached.

2019-10-21 09:38:29.280 WARN 2206 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class java.time.Instant as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 09:38:29.281 WARN 2206 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.Instant to class java.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 09:38:29.299 WARN 2206 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class java.time.Instant as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 09:38:29.300 WARN 2206 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.Instant to class java.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.


 Comments   
Comment by Oliver Drotbohm [ 21/Oct/19 ]

Can you clarify on you mentioning JodaTime but the log output only talking about Java time types?

Comment by Bjorn Harvold [ 21/Oct/19 ]

Hi Oliver Drotbohm. Posted that one too soon.

I took a closer look at the pom.xml I got when generating the test project. My project was using Spring Cloud Dependencies Greenwich .RELEASE and the test project was using Hoxton.M3. I was also using Spring Cloud GCP v1.1.1 and the test project is using 1.2.0.M3. The GCP milestone release does not have a dependency on Joda Time any longer.

It's still an issue with Spring Cloud GCP v1.1.x. Attaching an updated zip ball.

 

2019-10-21 14:24:18.330 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.333 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.335 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class java.time.Instant as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.335 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.Instant to class java.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.355 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.355 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.356 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.LocalDateTime to class java.time.Instant as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
2019-10-21 14:24:18.356 WARN 57135 --- [ main] o.s.data.convert.CustomConversions : Registering converter from class java.time.Instant to class java.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
Comment by Bjorn Harvold [ 21/Oct/19 ]

FYI, I am having a similar issue with Apache CXF depending on Shibboleth which in turn depends on Joda Time. So it would be great if we could programmatically choose to include / exclude default converters such as Joda Time.

Generated at Sun Jan 26 17:29:47 UTC 2020 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.