Announcement Announcement Module
No announcement yet.
handling items with ValidationExceptions Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • handling items with ValidationExceptions

    A previous post from Joris Kuipers talked about handling ValidationExceptions and skipping to the next item. In the end he came up with a custom solution of extending RestartableItemProviderTasklet with an ExceptionHandler.

    However the replies to the post seemed to imply that there was a fix for the M3 version. I have looked around the M3 code but can see no entry points for handling items with ValidationExceptions - is there such a facility in M3?

  • #2
    The change in M3 was to make ExceptionHandler responsible for abnormal termination - if an exception is thrown the ExceptionHandler is the one who decides that it should be rethrown. I'm not sure if that has any direct bearing on validation exceptions. There is a Spring Batch ValidationException class. Is that the one you mean, o rare you talking about generic validation problems?

    Generally I would expect to be able to skip a validation exception. It might be the case that as things are the only way to do that is to rollback the transaction (which might not be necessary), but other than that I can't see any particular problem. Did you see this thread ( on that topic?