Upgrade to JIRA 6.0.5 Fails Due to Error Exporting Data Prior To Upgrade

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When upgrading to JIRA 6.0.5, the process fails during the backup auto-export.

The following appears in the atlassian-jira.log:

2013-07-24 13:11:25	error	
Error occurred during export before upgrade: Error exporting data: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, OLD_ISSUE_KEY, ISSUE_ID FROM moved_issue_key (Table 'jiradb.moved_issue_key' doesn't exist)
If necessary, auto-export can be disabled; see http://www.atlassian.com/software/jira/docs/latest/upgrade/autoexport.html
com.atlassian.core.AtlassianCoreException: Error exporting data: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, OLD_ISSUE_KEY, ISSUE_ID FROM moved_issue_key (Table 'jiradb.moved_issue_key' doesn't exist)
at com.atlassian.jira.bean.export.AutoExportImpl.exportData(AutoExportImpl.java:109)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:376)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:333)
at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100)
at com.atlassian.jira.upgrade.UpgradeLauncher.start(UpgradeLauncher.java:49)
at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:117)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:315)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:209)
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:105)
at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:30)
at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:69)
at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33)
at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:64)
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:54)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Cause

The cause was that somehow the case of two tables in JIRA 6.0.5 was changed (moved_issue_key and project_key). This is due to a possible problem that MySQL sometimes case-sensitive with respect to database table names depending on underlying File System.

Workaround

As described in the log, auto-export can be disabled; see Disabling Auto-Export and the upgrade can be attempted again:

  • In these circumstances, you can force the upgrade to proceed by editing your jira-config.properties file (in the JIRA Home Directory) and setting the property jira.autoexport=false

An alternate workaround would be to rename the affected database tables:

  • There are two tables - PROJECT_KEY and MOVED_ISSUE_KEY. In MySQL you can do:
alter table PROJECT_KEY rename to project_key;
alter table MOVED_ISSUE_KEY rename to moved_issue_key;
  • You will need to restart JIRA after making the above changes.

Resolution

Upgrade to JIRA 6.0.6 as the bug has been fixed in JIRA 6.0.6 as per JRA-34024 - Getting issue details... STATUS

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.