Hi all! I'm new for this forum and perhaps can make some mistakes. But I hope that I will not.
I use Hibernate 3.6.9.Final and Oracle as underlying storage.
I got the next:
Code:
org.springframework.dao.DataIntegrityViolationException: could not insert:[ru.at_consulting.ruz.db.entities.User]
....
Code:
Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [ru.at_consulting.ruz.db.entities.User]
And finally:
Code:
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (GM.RUZ_SEC_USER_U1) violated.
The method retrieves users list from DB, after that checks theirs logins with new incoming users list, and then saves diffrence between the first and the second lists, more precisely will be saved users from incoming list which has not been stored in DB. I understand that it violation was caused in saveOrUpdate method during refresh process.
But what actually is unclear? - this constraint [RUZ_SEC_USER_U1] doesn't exist in DB!
In DB schema any constraint with this name does not exist at all (I've already checked it by ALL_CONSTRAINTS and DBA_CONSTRAINTS).
Somebody has seen such exception before? Can it be a hibernate problem?