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

  • Spring Exception Mapping

    Can someone point me to the best place to learn about spring exception translation? For example, when calling #getSingleResult on a TypedQuery I am expecting a NoResultException but getting a EmptyResultDataAccessException instead. I'd like to learn about where this happens and what are the different translations that occur so that I can adjust my EntityManager exception handling appropriately. Thanks!

  • #2
    I also notice that for #persist I get a hibernate ConstrainViolationException instead of a spring dao DataInegrityViolationException. Both of which are not an EntityExistsException. So I'd love a guide that would help me understand all of this.

    Do most people find these translations easier to deal with than just the documented JPA exceptions?