5 Replies Latest reply on Jan 7, 2012 5:17 PM by Mauricio Salatino

    Getting "Could not execute JDBC batch update" while running process in JBPM 5.1 with persistence

    uvijayreddy657 Newbie

      We have created all the required mapping tables as per the JPA entity classes. When we are running the process, it tries to insert the process instance data into the database and at that time we are facing below issue. Please see below for the error,

       

      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

      SLF4J: Defaulting to no-operation (NOP) logger implementation

      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

      org.hibernate.ejb.EntityManagerImpl@fbf51d

      1

      In Human Task Handler....

      Completed

      Hibernate: select hibernate_sequence.nextval from dual

      Hibernate: select user_.id from OrganizationalEntity user_ where user_.id=?

      Hibernate: select hibernate_sequence.nextval from dual

      Hibernate: select hibernate_sequence.nextval from dual

      Hibernate: select hibernate_sequence.nextval from dual

      Hibernate: select hibernate_sequence.nextval from dual

      Hibernate: insert into Task (allowedToDelegate, taskInitiator_id, priority, activationTime, actualOwner_id, createdBy_id, createdOn, documentAccessType, documentContentId, documentType, expirationTime, faultAccessType, faultContentId, faultName, faultType, outputAccessType, outputContentId, outputType, parentId, previousStatus, processInstanceId, skipable, status, workItemId, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

      Hibernate: insert into I18NText (language, text, id) values (?, ?, ?)

      Hibernate: insert into I18NText (language, text, id) values (?, ?, ?)

      Hibernate: insert into I18NText (language, text, id) values (?, ?, ?)

      Hibernate: insert into Content (content, id) values (?, ?)

      Hibernate: update Task set allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processInstanceId=?, skipable=?, status=?, workItemId=? where id=?


      javax.persistence.RollbackException: Error while committing the transaction

          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:93)

          at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:820)

          at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:134)

          at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:109)

          at org.jbpm.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)

          at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)

          at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)

          at org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)

          at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

          at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)

          at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)

          at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)

          at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)

          at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)

          at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)

          at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

          at java.lang.Thread.run(Thread.java:619)

      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)

          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)

          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:81)

          ... 29 more

      Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

          at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)

          at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

          at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)

          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)

          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)

          at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)

          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)

          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)

          at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)

          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)

          ... 29 more

      Caused by: java.sql.BatchUpdateException: ORA-02291: integrity constraint (SDS_OWNR.FK27A9A56CE1EF3A) violated - parent key not found

       

          at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)

          at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10720)

          at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)

          at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)

          ... 37 more