openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From is_maximum <>
Subject Re: how do you manage db exceptions?
Date Sun, 18 Jan 2009 15:08:15 GMT

It is a long time since my last post and I was really busy.
Now after things getting back to its normal way we face the same problem.
Unfortunately I was unable to find a way to catch the SQLException, because
OpenJPA throws a PersistenceException which is not an EJB exeption
(javax.persistence....) it's from org.apache..... so if I want to explore
the exception and all its causes to find a SQLException and then search for
a "Unique Constraint" string this will be very messy solution 

I am thinking of a listener or something to figure out the exception. can
anyone help me?

the solution Judes has suggested does not work because we are not using

thanks alot 
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message