Mar 9th, 2010, 04:28 AM
Infinite loop in RepeatTemplate when exception is thrown in a SkipListener
We have test cases where we throw some non-ignorable exception in a processor.
After that, we receive a callback in an instance of SkipListener we created. When an exception is thrown in that SkipListener (for some reason, programming error, database down,...) an infinite loop occur in the RetryTemplate class.
That behavior does not occur in all our jobs, just in some of them (I'm still investigating to isolate the configuration option that makes the bug occur).
By debugging, I've seen that in the class FaultTolerantChunkProcessor, the skipCount in the instance of StepContribution is never incremented, it stays 0. What do you think could cause that behavior?
Last edited by Nicolas Vanhoren; Mar 9th, 2010 at 06:21 AM.
Mar 9th, 2010, 04:41 AM
SkipListeners are not allowed to throw exceptions. If they do it should be a fatal error for the Job, so if you are using Spring Batch 2.1.0 can you open a JIRA? Otherwise can you upgrade and try again?
Mar 9th, 2010, 10:47 AM
Yes, we are using SB 2.1.0. I created a ticket: http://jira.springframework.org/browse/BATCH-1529 (by the way, I made a mistake, the exception is thrown in an exception listener, not a skip listener).