If you make Hibernate calls through the HibernateTemplate , then Spring translates any Hibernate exceptions (e.g. ConstraintViolationException ) into the Spring exception hierarchy (e.g. DataIntegrityViolationException ). If you are not using HibernateTemplate , then Hibernate's own exceptions will be thrown. Both values ββare RuntimeExceptions , so explicit exception handling is not required, so it is not always obvious which one you will see.
skaffman
source share