java - Are JPA / Hibernate Exceptions not translated? -


Using a JApa / Hibernate, a battery of DAO integration tests has ended, and many of them expect an exception to throw. However, I have noticed that hibernation has to be ignored by the good hierarchy of exceptions provided by JPA space and instead it always throws the general personality exception, which wraps their hibernate specific exception.

Am I doing something wrong or is it a bug in Hibernate?

You can use the @Repository and configure your repository with the spring, then You can use Spring's DataAccessException hierarchy, which is translated very well both from JPA and Hibernate by Spring.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -