-
Bug
-
Resolution: Can't Do
-
Critical
-
None
-
jBPM 3.3.0 GA
I face the below exceptions while trying to create a ProcessInstance.....
root cause : javax.ejb.EJBException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
and the other root cause:
java.sql.BatchUpdateException: ORA-02291: integrity constraint (******.FK_PROCIN_ROOTTKN) violated - parent key not found
However, the most annoying part is this occurs inconsistently.
After encountering this problem and after restarting the jboss server the error is gone! Again after a while starts occurring...
I'm not sure about the root cause, but I think the TransactionManager/related configuration has something to do with this...(because this never occurred when I wasn't using any TransactionManager...)
I'm using the below configuration for TransactionManagement in persistence.xml
<property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory"></property>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"></property>
<property name="hibernate.current_session_context_class" value="org.hibernate.context.JTASessionContext"></property>
and below in the jbpm-cfg.xml
<jbpm-context>
<service name="persistence">
<factory>
<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
<field name="isTransactionEnabled">
<false />
</field>
<field name="isCurrentSessionEnabled">
<false />
</field>
</bean>
</factory>
</service>
</jbpm-context>
When I googled abt this problem, I found many with similar issues but, couldn't find a valid solution for this... hence, I'm logging here... If there is any solution/this is fixed(in new releases) pls mention the same.