-
Sep 20th, 2007, 12:32 PM
#1
JPA ExceptionTranslation issue-Not Translating PersistenceException:unique constrait
I am using Spring 2.0.6 and OpenJPA 1.0.My Spring application context is configured to use the PersistenceExceptionTranslationPostProcessor and all DAO classes marked with the @Repository annotation.
The issue I have is,
I am trying to create a new Entity with a same field value as another Entity of the same type in the database, the field has a Unique Constraint on it.
When i do entityManager.persist(entity) i only get a org.apache.openjpa.persistence.PersistenceExceptio n:ORA-00001 unique constrait violated..... and this exception is not translated to spring's DataAccessException.
I was hoping it to be translated to the DataIntegrityViolated Exception.
Though some other exceptions are successfully translated to Spring Exceptions I am not sure why the unique constraint violation is not translated.
Is any one seeing similar issue or have any possible solutions ?
Your help will be greatly appreciated.
Last edited by addy999; Sep 20th, 2007 at 12:36 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules