Skip to content
Advertisement

spring batch table size limit

I am currently trying to read a table with about 5 million records using spring batch. After several minutes I got the follwing exception: org.springframework.batch.item.ItemStreamException:

I am using a simple query:

select * from table

When using a query with a limit like

select * from table limit 10000

it works well.

Is there a limit to the number of rows in a table that can be read by spring batch?

Advertisement

Answer

There is no limit to the size of the input table. You are facing this issue https://github.com/spring-projects/spring-batch/issues/3968 which has been fixed and planned for the next release, v4.3.4/v4.2.8.

That said, according to the stack trace you shared, the issue happens when attempting to translate the original SQLException into a DataAccessException. So I would be curious to know what the original SQLException is about.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement