How to fix "Could not synchronize database state with session"
Hello!I think I have messed up big time.
First let me explain my environment.
We got a app running in a weblogic 8.1.4.
We use Hibernate as ORM together with a Oracle.
To day I shot a testcase (through SoapUI, I do not think that matter).
The testcase is inserting a new row into the database, table A, and also in table B and C.
The PrimaryKey (id) in A, B and C is the same, but B:s and C:s id:s-column is not Foreign keys to id in A (I hope I do not remember wrong)
I guess I was a bit sloopy and stopped the wls, or something, before a commit was done. Or I messed with Oracle at the same time through Toad.
How ever after next restart of everything, and a new clean shot from SoapUI gave me this:
ORA-00001: unique constraint (TEST01ADMIN.SYS_C00450
Could not synchronize database state with session
...tViolationException: Could not execute JDBC batch update
In some how it looks like the Hibernate is not in synch with my Oracle.
The constraint SYS_C00450 is the Primarary key in table A, I guess then it tries to insert a new row with an already existing id.
Is there a way to try to tell Oracle, or Hibernate, to get in synch?
Correct me if I'm wrong when I say that there is a certain counter in Oracle for id:s? (Or was that ages ago?)
Any comment is most welcome!
Best regards
Fredrik