Results 1 to 2 of 2

Thread: Spring Exception Mapping

  1. #1
    Join Date
    Jan 2013
    Posts
    9

    Default 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. #2
    Join Date
    Jan 2013
    Posts
    9

    Default

    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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •