Upgrade Fails Due to Previously Failed Upgrade Attempt on Same JIRA Instance
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
An upgraded JIRA instance fails to start up and displays the following message in the log files:
1
2
3
4
5
6
7
8
[c.a.jira.upgrade.UpgradeManagerImpl] Problem adding upgrade task Drops the entityproperty_identity index in entity_property table to the upgrade history
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UpgradeHistory][targetbuild,64016][upgradeclass,com.atlassian.jira.upgrade.tasks.UpgradeTask_Build64016][downgradetaskrequired,Y][id,10820][status,complete] (SQL Exception while executing the following:INSERT INTO upgradehistory (ID, UPGRADECLASS, TARGETBUILD, STATUS, DOWNGRADETASKREQUIRED) VALUES (?, ?, ?, ?, ?) (Duplicate entry 'com.atlassian.jira.upgrade.tasks.UpgradeTask_Build64016' for key 'PRIMARY'))
at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:398)
at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:219)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.addToUpgradeHistory(UpgradeManagerImpl.java:966)
Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO upgradehistory (ID, UPGRADECLASS, TARGETBUILD, STATUS, DOWNGRADETASKREQUIRED) VALUES (?, ?, ?, ?, ?) (Duplicate entry 'com.atlassian.jira.upgrade.tasks.UpgradeTask_Build64016' for key 'PRIMARY')
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:684)
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:205)
Cause
The instance you are attempting to upgrade has already had one upgrade attempt against it. What has happened is that the database has not been properly rolled back to the state prior to the original upgrade attempt which causes a conflict when creating new tables.
Resolution
Ensure that the home directory and database are returned to the state from before the original upgrade attempt.
Was this helpful?