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

midpoint with Postgres first start exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.8
    • Component/s: Repository
    • Labels:
      None

      Description

      2018-06-05 10:43:37,737 [] [midPointScheduler_Worker-2] ERROR (com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor): Cannot record run finish for task Task(id:1528188203922-0-1, name:Validity Scanner, oid:00000000-0000-0000-0000-000000000006).
      com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException: org.hibernate.exception.ConstraintViolationException: could not execute batch
      	at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.modifyObjectAttempt(ObjectUpdater.java:502)
      	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:347)
      	at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.recordCycleRunFinish(JobExecutor.java:862)
      	at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeRecurrentTask(JobExecutor.java:536)
      	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: 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)
      	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:487)
      	... 9 common frames omitted
      Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into m_object_ext_date (item_id, owner_oid, ownerType, dateValue) values (1, '00000000-0000-0000-0000-000000000006', 0, '2018-06-05 10:43:36.897+02') was aborted: ERROR: insert or update on table "m_object_ext_date" violates foreign key constraint "fk_o_ext_date_item"
        Detail: Key (item_id)=(1) 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:148)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2179)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:479)
      	at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:835)
      	at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1556)
      	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)
      	... 26 common frames omitted
      Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "m_object_ext_date" violates foreign key constraint "fk_o_ext_date_item"
        Detail: Key (item_id)=(1) is not present in table "m_ext_item".
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
      	... 32 common frames omitted
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vix Ivan Noris
                Reporter:
                lazyman Viliam Repan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: