randomly get Exception
camunda Dec 16, 2005 11:01 AMVery strange thing:
from time to time we get a expeception while doing something with jBPM (in this example deploy a process, so this is not more that persist a few objects with hibernate):
12:21:32,452 WARN [JDBCExceptionReporter] SQL Error: 1, SQLState: 23000 12:21:32,452 ERROR [JDBCExceptionReporter] ORA-00001: unique constraint (BERND.SYS_C00581420) violated 12:21:32,452 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
The constraint lays on the JBPM_TRANSITION table.
As I check the logs everthings looks right:
2005-12-16 13:48:12,843 INFO [STDOUT] Hibernate: select hibernate_sequence.nextval from dual [...] 2005-12-16 13:48:12,843 INFO [STDOUT] Hibernate: select hibernate_sequence.nextval from dual 2005-12-16 13:48:12,843 INFO [com.camunda.tk-jbpm.services.AdminServicesImpl] deployment sucessfull 2005-12-16 13:48:12,843 INFO [STDOUT] Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_, ID_) values (?, ?, ?, ?, ?) 2005-12-16 13:48:12,843 INFO [STDOUT] Hibernate: insert into JBPM_NODE (NAME_, PROCESSDEFINITION_, ACTION_, SUPERSTATE_, CLASS_, ID_) values (?, ?, ?, ?, 'R', ?) [...] 2005-12-16 13:48:12,913 INFO [STDOUT] Hibernate: insert into JBPM_TRANSITION (NAME_, PROCESSDEFINITION_, FROM_, TO_, ID_) values (?, ?, ?, ?, ?) 2005-12-16 13:48:12,913 INFO [STDOUT] Hibernate: insert into JBPM_TRANSITION (NAME_, PROCESSDEFINITION_, FROM_, TO_, ID_) values (?, ?, ?, ?, ?)
But while commiting the exception occurs. I think it is something wrong with the ID-Generating? As I looked into jbpm-sources it is
<id name="id" column="ID_"><generator class="native" /></id>, should be ok. We use the dialect: org.hibernate.dialect.Oracle9Dialect
Then, if I want to deploy the process after the rollback, I get another error:
2005-12-16 16:10:53,463 INFO [STDOUT] Hibernate: select hibernate_sequence.nextval from dual 2005-12-16 16:10:53,463 ERROR [org.jbpm.db.GraphSession] org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.jbpm.graph.def.ProcessDefinition#1]
I am sorry, but I am not the hibernate champ (I favour JDO ;-)), so any hints to this?
We have seen this exception randomly occur in other contextes (on other jBPM tables) but doesn't have not succesfully written a test, which fails every time...
Thanks a lot!