I am using JdbcPagingItemReader, I have certain records that are causing exceptions in the mapRow method of the reader.
My step is configured to skip all the exceptions and the skip limit is Integer.INT_MAX, it is as follows :
.skip(Exception.class)
.skipLimit(Integer.INT_MAX)
.listener(CustomSkipListener)
I have defined a CustomSkipListener which prints the stack trace from the throwable.
now, my chunk size is 100 and the number of records eligible for read are around 450+
After the first exception is encountered, I do see the execution reaching onSkipInRead method,
although the code gets terminated.
Ideally it should have skipped and moved ahead with reading other records.
I have something like in the mapRow method,
@Override
public CustomObj mapRow(ResultSet rs,int rowNum) {
try {
.. do something
} catch(Exception.class) {
throw new RuntimeException(e)
}
}
I did try configuring several listeners to check whether atleast the record is being marked skipped.