I have a spring batch application that was running fine in spring batch 3.x, then it was upgraded to 5.x and it started to fail with:
Syntax error, expected something like an integer or a decimal number between the ‘top’ keyword and ‘?’.
The query is a simple “Select * from table_name” that is passed to JpaNativeQueryProvided SetSQlQuery, which is then passed to JpaPagingItemReaderBuilder QueryProvider.
It seems that Jpa is adding “Top ?” to the query, however I have no idea where it is expecting the value from.
I have made some changes related to spring batch 3.x to 5.x, and started to use hibernate-community-dialects for teradata, but the issue persists.
car_dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.