Skip to content

Spring Data (2.4+) projection failing while querying LocalDateTime attribute as LocalDate. Same working in SB 2.3.7 #2212

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

Closed
prabhugopal opened this issue May 5, 2021 · 3 comments

Comments

@prabhugopal
Copy link

We recently upgraded out application to 2.4.5 from 2.3.7, and we facing below exception with spring data (closed) projection.

The projection fails with below exception

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Projection type must be an interface! (through reference chain ***

I went through the following links as it related to this issue, and assuming it is fixed (partially).

#2121

spring-projects/spring-data-commons#2223

https://jira.spring.io/browse/DATACMNS-1836

But it seems the issue still exists, In our situation we have got entities with attributes of type LocalDateTime & the projection attributes with LocalDate. The conversion from LocalDateTime to LocalDate was working without any custom convertor or serializer in SB2.3.7 but after upgrading to SB2.4.5 (tried downgrading to 2.4.0 same issue exists) we get the above exception.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 5, 2021
@schauder
Copy link
Contributor

schauder commented May 6, 2021

Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers.

@schauder schauder added the status: waiting-for-feedback We need additional information before we can continue label May 6, 2021
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label May 13, 2021
@spring-projects-issues
Copy link

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants