Announcement Announcement Module
Collapse
No announcement yet.
DB Item Writer Exceptions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DB Item Writer Exceptions

    Hello,

    I am trying to write a simple batch job that reads from a flat file and writes the data to database tables. I have the job running properly when everything goes smoothly.

    My issue is that if I get an exception writing a single record, such as a duplicate record, to a database the entire job fails. Can anyone tell me how to log failed record and continue processing the remaining data from the file?

    Thanks,
    Frank
    Last edited by frank12345; May 6th, 2011, 03:05 PM.

  • #2
    Did you see the sections in the user guide on skip and retry (http://static.springsource.org/sprin...onfiguringSkip, http://static.springsource.org/sprin...l#retryLogic)?

    Comment


    • #3
      I would write an aspect to take the entire list of records with the problem, and try to insert them 1 by 1 until you get to the bad record. Then either throw out that 1 record, or handle it in some way.

      Comment

      Working...
      X