Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

jira restore problem when Migration server

when I Migration server and use XML bakupfiles to restore the jira,it shows:

1、JiraImportTaskExecutionThread-1 ERROR root 1025x34x1 15p19z3 /secure/admin/XmlRestore.jspa [c.a.upgrade.core.DefaultUpgradeTaskFactoryProcessor] Upgrade task [host,buildNumber=77001] failed
java.lang.RuntimeException: Error running original upgrade task

2、Caused by: com.querydsl.core.QueryException: Caught SQLException for delete from clusteredjob
where not in (select max(
from (select, preload.job_id
from clusteredjob preload) as jobs
group by jobs.job_id)
at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(
at com.querydsl.sql.dml.SQLDeleteClause.execute(
at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build77001.lambda$doUpgrade$0(
at com.atlassian.jira.database.DefaultQueryDslAccessor$1.lambda$executeQuery$0(
at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(
at com.atlassian.jira.database.DefaultQueryDslAccessor$1.executeQuery(
at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build77001.doUpgrade(
at com.atlassian.jira.upgrade.AbstractUpgradeTask.runUpgrade(
... 34 more

3、Caused by: java.sql.SQLException: You can't specify target table 'clusteredjob' for update in FROM clause

my server is centos 7.3,mysql:5.7.8-0.3,mysql-connect:mysql-connector-java-5.1.47-bin.jar,jira:7.9-->7.9
the XML backup zip file has: ├── activeobjects.xml ├── entities.xml


1 answer

1 vote
Andy Heinzer Atlassian Team Mar 22, 2019


Jira is failing to run this upgrade task due to a known bug in versions of MySQL between 5.7.0 and 5.7.17.  We track this from Jira's side in JRASERVER-67169

MySQL is tracking that bug in

Technically this is not something Jira itself can fix.   Instead the solution here is to get to a database version that won't have this bug.

MySQL 5.7.18 and Later won't have this problem.  So I would recommend that you either update your database or migrate your Jira database to a version of Mysql 5.7.18 or higher OR to a different supported database type, such as postgresql.   This way you should then be able to complete this upgrade/migration of your data successfully.

I hope this helps.


Thanks, I will install the 5.7.18 version db to try again. 

Suggest an answer

Log in or Sign up to answer