Unable to move failed projects in sonarqube using import/export option

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) : 8.4.1 Enterprise Edition in both source & target machines
  • what are you trying to achieve: We need to migrate all the projects from one sonarqube to another sonarqube instance.
  • what have you tried so far to achieve this: I’m able to move “passed” projects in source sonarqube to destination sonarqube successfully using import/export option.

When i try to import the “failed” projects from target server, getting the below error. Please assist on the same.

Error Details attached.




java.lang.IllegalStateException: Issue changelog import failed after processing 249 issue changes successfully
at com.sonar.governance.ce.A.A.A.execute(Unknown Source)
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.A.B.A(Unknown Source)
at com.sonar.governance.ce.A.A.A(Unknown Source)
at com.sonar.governance.ce.F.A.A(Unknown Source)
at com.sonar.governance.ce.F.A.process(Unknown Source)
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(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
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, 'AXo3F_G5h6KE4vcVaUjx', NULL,
'diff', 'resolution=FIXED,line=1301|,status=OPEN|CLOSED', 1656430566662,
1656430566662, 1624430814260) was aborted: ERROR: null value in column "uuid" violates not-null constraint

Detail: Failing row contains (null, null, AXo3F_G5h6KE4vcVaUjx, null, diff, resolution=FIXED,line=1301|,status=OPEN|CLOSED, 1656430566662, 1656430566662, 1624430814260). 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, 'AXo3F_G5h6KE4vcVaUjx', NULL,
'diff', 'resolution=FIXED,line=1301|,status=OPEN|CLOSED', 1656430566662,
1656430566662, 1624430814260) was aborted: ERROR: null value in column "uuid" violates not-null constraint

Detail: Failing row contains (null, null, AXo3F_G5h6KE4vcVaUjx, null, diff, resolution=FIXED,line=1301|,status=OPEN|CLOSED, 1656430566662, 1656430566662, 1624430814260). 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.$Proxy46.insert(Unknown Source)
at org.sonar.db.issue.IssueChangeDao.insert(IssueChangeDao.java:65)
… 23 more
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, ‘AXo3F_G5h6KE4vcVaUjx’, NULL,
‘diff’, ‘resolution=FIXED,line=1301|,status=OPEN|CLOSED’, 1656430566662,
1656430566662, 1624430814260) was aborted: ERROR: null value in column “uuid” violates not-null constraint
Detail: Failing row contains (null, null, AXo3F_G5h6KE4vcVaUjx, null, diff, resolution=FIXED,line=1301|,status=OPEN|CLOSED, 1656430566662, 1656430566662, 1624430814260). 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 more
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, ‘AXo3F_G5h6KE4vcVaUjx’, NULL,
‘diff’, ‘resolution=FIXED,line=1301|,status=OPEN|CLOSED’, 1656430566662,
1656430566662, 1624430814260) was aborted: ERROR: null value in column “uuid” violates not-null constraint
Detail: Failing row contains (null, null, AXo3F_G5h6KE4vcVaUjx, null, diff, resolution=FIXED,line=1301|,status=OPEN|CLOSED, 1656430566662, 1656430566662, 1624430814260). 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 more
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column “uuid” violates not-null constraint
Detail: Failing row contains (null, null, AXo3F_G5h6KE4vcVaUjx, null, diff, resolution=FIXED,line=1301|,status=OPEN|CLOSED, 1656430566662, 1656430566662, 1624430814260).
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
… 45 more

Hi,

As previously expressed, we cannot support you on version 8.4. You need to upgrade both servers and then do the move. If you have import/export problems with a current version - either 8.9.9 LTS or 9.5 - then we can help you.

 
:woman_shrugging:
Ann

Sure Ann, Tomorrow is the last date for us to perform the migration. Post migration, we will upgrade our systems. Please confirm should i be able to move failed projects from one sonarqube to another?

Regards,
Jagan

Hi Jagan,

I don’t know what the problem with the move in 8.4 is, so I can’t confirm that there won’t be a problem in a supported version. I can only confirm that when you get to a supported version, we’ll be able to help if there is a problem.

 
Ann