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.