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

Unable to use projections in ItemReader #4665

Open
jobas2007 opened this issue Sep 20, 2024 · 0 comments
Open

Unable to use projections in ItemReader #4665

jobas2007 opened this issue Sep 20, 2024 · 0 comments
Labels
status: waiting-for-triage Issues that we did not analyse yet type: bug

Comments

@jobas2007
Copy link

While tyring to use projections in item reader, always getting "NoSuchMethodException" (for the projection method in jpa repository). Tried multiple ways, although same works when invoking via say a controller.
Error:
Caused by: java.lang.NoSuchMethodException: jdk.proxy2.$Proxy115.findDistinctByCreatedAfter(java.time.LocalDate,org.springframework.data.domain.PageRequest)
at java.base/java.lang.Class.getMethod(Class.java:2405) ~[na:na]

Env: Spring Boot 3.X, JDK 17

Created a github demo project with all set up to demonstrate issue runtime
https://github.com/jobas2007/batch-h2-demo

Expected behavior is to be able to use projection fitting into batch processing

All details are in the stackoverflow
https://stackoverflow.com/questions/79002944/purge-group-of-old-records-iteratively-to-insert-fresh-data-daily

Appreciate any help/assistance/suggestions, as been struggling for a while now. Thanks

@jobas2007 jobas2007 added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage Issues that we did not analyse yet type: bug
Projects
None yet
Development

No branches or pull requests

1 participant