3 Replies Latest reply on Jan 19, 2010 10:20 AM by Ronald van Kuijk

    unique constraint and ORA-01400 when saving task instance

    Bo Jiang Newbie

      Hi

         Two exceptions may occur when i complete a task instance. These two exceptions do not occur very often. When I complete about 100 task instances , 10 or less cases may come to these two exceptions. The version is jbpm 3.2.2 and I use oracle 10g .

         I have checked the hibernate_sequence and the hibernate configuration.

         I just complete an existing task instance in a single transation.

         Any one can help me ?

       

      2010.01.06-09:26:26 [WebContainer : 5] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-01400: cannot insert NULL into ("BAO4_OWN"."JBPM_LOG"."ID_")
      
      2010.01.06-09:26:26 [WebContainer : 5] ERROR org.hibernate.event.def.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:94)
           at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
           at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
           at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
           at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
           at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)
           at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
           at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
           at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
           at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
           at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
      java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("BAO4_OWN"."JBPM_LOG"."ID_")
      
           at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
           at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
           at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:941)
           at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:705)
           at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
           ... 71 more
      

       

       

      2010.01.05-13:21:13 [WebContainer : 9] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog - Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
      2010.01.05-13:21:14 [WebContainer : 9] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000
      2010.01.05-13:21:14 [WebContainer : 9] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (BAO4_OWN.PK_JBPM_LOG) violated
      
      2010.01.05-13:21:14 [WebContainer : 9] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000
      2010.01.05-13:21:14 [WebContainer : 9] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (BAO4_OWN.PK_JBPM_LOG) violated
      
      2010.01.05-13:21:14 [WebContainer : 9] ERROR org.hibernate.event.def.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:94)
           at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
           at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
           at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
           at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
           at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)
           at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
           at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
           at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
           at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
           at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
      Caused by: 
      java.sql.BatchUpdateException: ORA-00001: unique constraint (BAO4_OWN.PK_JBPM_LOG) violated
      
           at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
           at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
           at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:941)
           at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:705)
           at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
           ... 87 more