Announcement Announcement Module
No announcement yet.
FlatFileItemReader question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • FlatFileItemReader question

    In Spring Batch 1.1, when my FFIR encountered a problem parsing a line, it gave a nice error message showing which line in the file encountered the problem.

    In Spring Batch 2.0, it no longer provides such contextual information.

    Is there a reason that this was removed? We really relied on this to determine where in the file the problem occurred.

  • #2
    So, it looks like the 'lineNumber' context is now passed to the LineMapper by the FFIR. Unfortunately, the DefaultLineMapper ignores this parameter and invokes the fieldsetmapper and linetokenizer nakedly (neither of which is passed this context) so any exceptions thrown by either of these collaborators bypass the mapper and bubbles up, losing the linenumber context in the process.

    It would be very useful if this implementation could catch exceptions thrown by either the fieldsetmapper or linetokenizer, wrap them with a new exception containing the line number (like the previous incarnation of the FFIR) and rethrow.


    • #3

      If you log an issue in JIRA about this we will discuss it.

      Thanks for the input.


      • #4
        Added JIRA issue: