Getting hold of the Line Number in SkipListener
I am currently doing some validations in the ItemProcessor and i try to skip the record when the validation fails. At the same time i also have configured a SkipListener which needs to log this record to the tables so that it can be tracked and fixed later. One of the req is to know the line number so that it would be easy to trace the record the file. Hence i want to log the line number of this record as well. Is there a way to get hold of the line number in the onSkipInProcess() method of SkipListener. Initially i thought i would use the readCount of StepExecution, but i presume it will not yield proper results if the job restarts.
Could somebody let me know the way to get hold of the line number in the onSkipInProcess() method for a ValidationException?
Thanks in advance.