Never catch Exception (or worse, Throwable). If a JPAException has occurred below this, this code will report it as something entirely different (note that e.getMessage() might not state it's related to JPA at all).