Problem with bonita engine - Hibernate transactions - Deadlock
Hello community, firstable sorry for my english.
We have issues with our process, we have been analyzing the troubles which could be related with bonita engine and its connections and transactions with the database engine.
The exceptions from Bonita's log are:
1) Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.ow2.bonita.runtime.model.Execution#79715]
2) org.ow2.bonita.services.impl.DefaultCommandService execute
SEVERE: exception while executing command org.ow2.bonita.runtime.event.ExecuteJobsCommand@420e4191: Unexpected Exception arrived in Bonita: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.ow2.bonita.runtime.model.Execution#79715]
3) SEVERE: exception while executing command org.ow2.bonita.runtime.event.JobExceptionHandler@32d55b32: null
Nov 8, 2013 10:37:43 AM org.ow2.bonita.runtime.event.JobExecutorThread run
SEVERE: Exception in event block: java.lang.NullPointerException
4) SEVERE: exception while executing command org.ow2.bonita.runtime.event.ExecuteJobsCommand@babf42d: Batch update returned unexpected row count from update ; actual row count: 0; expected: 1
Nov 8, 2013 10:22:24 AM org.hibernate.jdbc.BatchingBatcher doExecuteBatch
SEVERE: Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update ; actual row count: 0; expected: 1
5) Nov 8, 2013 12:36:58 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1213, SQLState: 40001
Nov 8, 2013 12:36:58 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Deadlock found when trying to get lock; try restarting transaction
Nov 8, 2013 12:36:58 PM org.hibernate.AssertionFailure
SEVERE: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: null identifier
We have detected that when we handle asynchronism in our processes, the engine throws more exceptions than when we handle synchronism. A clear case is this, if we use the multi-intanciation mechanism in asynchronic way and we look through the engine of the rest API for certain information, the processes go down, in other words, when the engine is instanciated, we can't read or see it.
This behavior made us handle a synchronization level in our application to avoid the problem, but it is strange that the engine doesn't have a right administration of this kind of things when it provides the facilities to handle paralelism like asynchronic multi-intanciation by itself.
Could you help us with this problems in order to know if this is an engine problem, or if there is some configuration missing, or if this could be a problem in our defined processes?
We have this enviroment:
OS: Red Hat Linux 2.6.32-343.el6.x86_64 x86_64 x86_64 x86_64 GNU/Linux
Database: Mysql Server 5.1.66
Thanks for your suggestions.