Announcement Announcement Module
No announcement yet.
Detailed error reporting while parsing files Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Detailed error reporting while parsing files


    Thanks for making this project available!

    After briefly looking at the parsing files/reading records capabilities of Spring Batch I have the following question:

    Does Spring Batch offer any functionality to provide very detailed error messages when the parsing a record fails?

    In my projects, it is often important to provide rather detailed error reporting. For example, I have a flat-file that I am parsing and a parse exception occurs on the 4th record because the date at the 6th field could not be parsed.

    I would like to be able to report those kinds of errors to the users.
    (So I can present the user with a detailed message with the exact location of the error, the incorrect value if available etc.)

    I was looking at the code and Java Docs, specifically at but I could not see anything that would directly support that, as those methods in FieldSet only throw fairly generic RuntimeExceptions.

    Is this a feature you still plan to implement?

    Thanks a lot!

    Gunnar Hillert

  • #2
    FieldSet makes some efforts to give detailed information about failures. It could definitely be improved, so please create a JIRA for it if you want more. But of course it is not aware of the line number in the open InputSource that is being parsed. The InputSource might be able to tell us the line number. Another JIRA?