Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-4648

LiveSync throws repository error, next iteration is without problems

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.8
    • Fix Version/s: 3.8
    • Component/s: None
    • Labels:
      None
    • Environment:

      MID101 training
      postgresql

      Description

      1. imported single account - user was created OK
      2. started livesync
      3. edited the same account to get the changes - FAIL (see below)
      4. task was suspended, but upon resuming, the change was processed without any error

      2018-05-14 12:13:31,230 [] [midPointScheduler_Worker-2] WARN (com.evolveum.midpoint.task.api.StateReporter): Couldn't report execution of ICF operation ICF_GET_LATEST_SYNC_TOKEN on resource 10000000-9999-9999-0000-a000ff000001 because there is no task assigned.
      2018-05-14 12:13:31,287 [] [midPointScheduler_Worker-2] ERROR (org.hibernate.internal.ExceptionMapperStandardImpl): HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute batch]
      2018-05-14 12:13:31,288 [] [midPointScheduler_Worker-2] ERROR (com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl): org.hibernate.exception.ConstraintViolationException: could not execute batch
      com.evolveum.midpoint.util.exception.SystemException: org.hibernate.exception.ConstraintViolationException: could not execute batch
              at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralRuntimeException(BaseHelper.java:174)
              at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralException(BaseHelper.java:154)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.modifyObjectAttempt(ObjectUpdater.java:508)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:577)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:515)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:507)
              at com.evolveum.midpoint.task.quartzimpl.TaskQuartzImpl.savePendingModifications(TaskQuartzImpl.java:348)
              at com.evolveum.midpoint.provisioning.impl.ShadowCache.synchronize(ShadowCache.java:2095)
              at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.synchronize(ProvisioningServiceImpl.java:375)
              at com.evolveum.midpoint.model.impl.sync.LiveSyncTaskHandler.run(LiveSyncTaskHandler.java:181)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executePlainTaskHandler(JobExecutor.java:667)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeHandler(JobExecutor.java:656)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeRecurrentTask(JobExecutor.java:535)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.execute(JobExecutor.java:190)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:588)
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute batch
              at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:149)
              at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:157)
              at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:164)
              at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1443)
              at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493)
              at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3207)
              at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2413)
              at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:473)
              at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:156)
              at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38)
              at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)
              at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:68)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.modifyObjectAttempt(ObjectUpdater.java:488)
              ... 13 common frames omitted
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch
              at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
              at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
              at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:121)
              at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97)
              at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147)
              at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:212)
              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:618)
              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
              at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
              at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1437)
             ... 22 common frames omitted
      Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into m_object_ext_string (item_id, owner_oid, ownerType, stringValue) values (8, '780c9b24-661c-44a2-bcdc-553b9feef40d', 0, '1526292811241') was aborted: ERROR: insert or update on table "m_object_ext_string" violates foreign key constraint "fk_o_ext_string_item"
        Detail: Key (item_id)=(8) is not present in table "m_ext_item".  Call getNextException to see other errors in the batch.
              at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:145)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2156)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:460)
              at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:793)
              at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1659)
              at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
              at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:111)
              ... 30 common frames omitted
      Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "m_object_ext_string" violates foreign key constraint "fk_o_ext_string_item"
        Detail: Key (item_id)=(8) is not present in table "m_ext_item".
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
              ... 36 common frames omitted
      2018-05-14 12:13:31,289 [] [midPointScheduler_Worker-2] ERROR (com.evolveum.midpoint.model.impl.sync.LiveSyncTaskHandler): Live Sync: Internal Error:
      com.evolveum.midpoint.util.exception.SystemException: org.hibernate.exception.ConstraintViolationException: could not execute batch
              at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralRuntimeException(BaseHelper.java:174)
              at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralException(BaseHelper.java:154)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.modifyObjectAttempt(ObjectUpdater.java:508)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:577)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:515)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:507)
              at com.evolveum.midpoint.task.quartzimpl.TaskQuartzImpl.savePendingModifications(TaskQuartzImpl.java:348)
              at com.evolveum.midpoint.provisioning.impl.ShadowCache.synchronize(ShadowCache.java:2095)
              at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.synchronize(ProvisioningServiceImpl.java:375)
              at com.evolveum.midpoint.model.impl.sync.LiveSyncTaskHandler.run(LiveSyncTaskHandler.java:181)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executePlainTaskHandler(JobExecutor.java:667)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeHandler(JobExecutor.java:656)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeRecurrentTask(JobExecutor.java:535)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.execute(JobExecutor.java:190)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:588)
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute batch
              at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:149)
              at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:157)
              at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:164)
              at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1443)
              at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493)
              at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3207)
              at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2413)
              at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:473)
              at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:156)
              at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38)
              at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)
              at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:68)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.modifyObjectAttempt(ObjectUpdater.java:488)
              ... 13 common frames omitted
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch
              at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
              at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
              at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:121)
              at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97)
              at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147)
              at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:212)
              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:618)
              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
              at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
              at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1437)
              ... 22 common frames omitted
      Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into m_object_ext_string (item_id, owner_oid, ownerType, stringValue) values (8, '780c9b24-661c-44a2-bcdc-553b9feef40d', 0, '1526292811241') was aborted: ERROR: insert or update on table "m_object_ext_string" violates foreign key constraint "fk_o_ext_string_item"
        Detail: Key (item_id)=(8) is not present in table "m_ext_item".  Call getNextException to see other errors in the batch.
              at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:145)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2156)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:460)
              at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:793)
              at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1659)
              at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
              at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:111)
              ... 30 common frames omitted
      Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "m_object_ext_string" violates foreign key constraint "fk_o_ext_string_item"
        Detail: Key (item_id)=(8) is not present in table "m_ext_item".
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
              ... 36 common frames omitted
      2018-05-14 12:13:31,380 [] [midPointScheduler_Worker-2] INFO (com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor): Task encountered permanent error, suspending the task. Task = Task(id:1526292811091-0-1, name:LiveSync, oid:780c9b24-661c-44a2-bcdc-553b9feef40d)
      2018-05-14 12:13:31,380 [] [midPointScheduler_Worker-2] INFO (com.evolveum.midpoint.task.quartzimpl.TaskManagerQuartzImpl): Suspending tasks [Task(id:1526292811091-0-1, name:LiveSync, oid:780c9b24-661c-44a2-bcdc-553b9feef40d)]; do not stop tasks.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vix Ivan Noris
              Reporter:
              vix Ivan Noris
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: