Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13739

Import/export failure on issue change step

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.4
    • Fix Version/s: 8.5
    • Component/s: Database, Project Export
    • Labels:
      None
    • Edition:
      Enterprise
    • Production Notes:
      None

      Description

      For some projects you can get an error similar to this one during a project import:

      2020.08.07 15:21:18 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=org.sonarsource.sonarqube:sonarqube | type=PROJECT_IMPORT | id=AXPJFTlXuh-OAqXkshJD | submitter=admin
      2020.08.07 15:21:18 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Load project | status=SUCCESS | time=11ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Load dump file | status=SUCCESS | time=3732ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Initialize | status=SUCCESS | time=12ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Check SonarQube version | status=SUCCESS | time=2ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Check plugins | status=SUCCESS | time=6ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Fail on project duplication | status=SUCCESS | time=3ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Load metrics | status=SUCCESS | time=19ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import ad-hoc rules | status=SUCCESS | time=230ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Load rules | status=SUCCESS | time=125ms
      2020.08.07 15:21:22 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import branches | status=SUCCESS | time=15ms
      2020.08.07 15:28:43 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import components | status=SUCCESS | time=441340ms
      2020.08.07 15:28:44 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import analyses | status=SUCCESS | time=216ms
      2020.08.07 15:28:46 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import measures | status=SUCCESS | time=2340ms
      2020.08.07 15:36:19 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import live measures | status=SUCCESS | time=452633ms
      2020.08.07 15:36:29 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import issues | status=SUCCESS | time=10087ms
      2020.08.07 15:36:29 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.s.ComputationStepExecutor] Import issues changelog | status=FAILED | time=53ms
      2020.08.07 15:36:29 ERROR ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.CeWorkerImpl] Failed to execute task AXPJFTlXuh-OAqXkshJD
      java.lang.IllegalStateException: Issue changelog import failed after processing 249 issue changes successfully
      	at com.sonar.governance.ce.projectimport.issue.ImportIssuesChangelogStep.execute(ImportIssuesChangelogStep.java:51)
      	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
      	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
      	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
      	at com.sonar.governance.ce.projectimport.ProjectImportProcessor.process(ProjectImportProcessor.java:21)
      	at com.sonar.governance.ce.projectimport.ProjectImportTaskProcessor.run(ProjectImportTaskProcessor.java:28)
      	at com.sonar.governance.ce.taskprocessor.RoutingTaskProcessor.processProjectImport(RoutingTaskProcessor.java:74)
      	at com.sonar.governance.ce.taskprocessor.RoutingTaskProcessor.process(RoutingTaskProcessor.java:50)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:235)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:217)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:162)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:137)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:89)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
      	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
      	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
      	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.apache.ibatis.exceptions.PersistenceException:
      ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueChangeMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO issue_changes (kee, uuid, issue_key, user_login, change_type, change_data, created_at, updated_at,
          issue_change_creation_date)
          VALUES (NULL, NULL, '32fbf65e-2cf0-4871-ab1d-ac41f133d6e8', 'julienlancelot@github',
          'diff', 'status=REOPENED|CONFIRMED', 1596807389246,
          1596807389246, 1389191103661) was aborted: ERROR: null value in column "uuid" violates not-null constraint
        Detail: Failing row contains (null, 32fbf65e-2cf0-4871-ab1d-ac41f133d6e8, julienlancelot@github, diff, status=REOPENED|CONFIRMED, 1596807389246, 1596807389246, 1389191103661, null).  Call getNextException to see other errors in the batch.
      ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueChangeMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO issue_changes (kee, uuid, issue_key, user_login, change_type, change_data, created_at, updated_at,
          issue_change_creation_date)
          VALUES (NULL, NULL, '32fbf65e-2cf0-4871-ab1d-ac41f133d6e8', 'julienlancelot@github',
          'diff', 'status=REOPENED|CONFIRMED', 1596807389246,
          1596807389246, 1389191103661) was aborted: ERROR: null value in column "uuid" violates not-null constraint
        Detail: Failing row contains (null, 32fbf65e-2cf0-4871-ab1d-ac41f133d6e8, julienlancelot@github, diff, status=REOPENED|CONFIRMED, 1596807389246, 1596807389246, 1389191103661, null).  Call getNextException to see other errors in the batch.
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:226)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:217)
      	at org.sonar.db.DbSessionImpl.commit(DbSessionImpl.java:42)
      	at org.sonar.db.BatchSession.commit(BatchSession.java:168)
      	at org.sonar.db.BatchSession.increment(BatchSession.java:205)
      	at org.sonar.db.BatchSession.insert(BatchSession.java:125)
      	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
      	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:144)
      	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)
      	at com.sun.proxy.$Proxy53.insert(Unknown Source)
      	at org.sonar.db.issue.IssueChangeDao.insert(IssueChangeDao.java:65)
      	at com.sonar.governance.ce.projectimport.issue.ImportIssuesChangelogStep.execute(ImportIssuesChangelogStep.java:45)
      	... 22 common frames omitted
      Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueChangeMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO issue_changes (kee, uuid, issue_key, user_login, change_type, change_data, created_at, updated_at,
          issue_change_creation_date)
          VALUES (NULL, NULL, '32fbf65e-2cf0-4871-ab1d-ac41f133d6e8', 'julienlancelot@github',
          'diff', 'status=REOPENED|CONFIRMED', 1596807389246,
          1596807389246, 1389191103661) was aborted: ERROR: null value in column "uuid" violates not-null constraint
        Detail: Failing row contains (null, 32fbf65e-2cf0-4871-ab1d-ac41f133d6e8, julienlancelot@github, diff, status=REOPENED|CONFIRMED, 1596807389246, 1596807389246, 1389191103661, null).  Call getNextException to see other errors in the batch.
      	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:149)
      	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:129)
      	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:122)
      	at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:242)
      	at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:119)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:223)
      	... 33 common frames omitted
      Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO issue_changes (kee, uuid, issue_key, user_login, change_type, change_data, created_at, updated_at,
          issue_change_creation_date)
          VALUES (NULL, NULL, '32fbf65e-2cf0-4871-ab1d-ac41f133d6e8', 'julienlancelot@github',
          'diff', 'status=REOPENED|CONFIRMED', 1596807389246,
          1596807389246, 1389191103661) was aborted: ERROR: null value in column "uuid" violates not-null constraint
        Detail: Failing row contains (null, 32fbf65e-2cf0-4871-ab1d-ac41f133d6e8, julienlancelot@github, diff, status=REOPENED|CONFIRMED, 1596807389246, 1596807389246, 1389191103661, null).  Call getNextException to see other errors in the batch.
      	at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:159)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2268)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:510)
      	at org.postgresql.jdbc.PgStatement.internalExecuteBatch(PgStatement.java:851)
      	at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:874)
      	at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1563)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:242)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:242)
      	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:123)
      	... 38 common frames omitted
      Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "uuid" violates not-null constraint
        Detail: Failing row contains (null, 32fbf65e-2cf0-4871-ab1d-ac41f133d6e8, julienlancelot@github, diff, status=REOPENED|CONFIRMED, 1596807389246, 1596807389246, 1389191103661, null).
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
      	... 45 common frames omitted
      2020.08.07 15:36:29 INFO  ce[AXPJFTlXuh-OAqXkshJD][o.s.c.t.CeWorkerImpl] Executed task | project=org.sonarsource.sonarqube:sonarqube | type=PROJECT_IMPORT | id
      

        Attachments

          Activity

            People

            Assignee:
            michal.duda Michal Duda (Inactive)
            Reporter:
            michal.duda Michal Duda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: