openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marko Asplund" <marko.aspl...@gmail.com>
Subject Re: How do I distinguish different types of exceptions in openjpa
Date Sun, 02 Dec 2007 17:10:58 GMT
Gul wrote:
> When a database error occurs in the openjpa, I always get rollback
> exception. For example if there is an error
> because of a duplicate record creation attempt, I still get rollback
> exception.
>
> Is there a way to inspect the exception to see the root cause ?

I've found it sometimes useful to use Spring framework for mapping the
database exception to the Spring DAO exception hierarchy so that the root
cause can be determined in a database independent fashion:

http://static.springframework.org/spring/docs/2.5.x/reference/dao.html#dao-exceptions



marko

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message