Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade Jira 6.4.7 to 7.0.11 I got an Error

jira
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2019

I'm trying to upgrade 6.4.7 to 7.0.11 but I got an error

Unexpected exception during JIRA startup. This JIRA instance will not be able to recover. Please check the logs for details

 

Log file

 

Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO PUBLIC.upgradehistory (ID, UPGRADECLASS, TARGETBUILD, STATUS, DOWNGRADETASKREQUIRED) VALUES (?, ?, ?, ?, ?) (Unique index or primary key violation: "PRIMARY_KEY_25 ON PUBLIC.UPGRADEHISTORY(UPGRADECLASS) VALUES ('com.atlassian.jira.upgrade.tasks.UpgradeTask_Build70109', 35)"; SQL statement:
INSERT INTO PUBLIC.upgradehistory (ID, UPGRADECLASS, TARGETBUILD, STATUS, DOWNGRADETASKREQUIRED) VALUES (?, ?, ?, ?, ?) [23505-185])
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:683)
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:205)
... 37 more
Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_25 ON PUBLIC.UPGRADEHISTORY(UPGRADECLASS) VALUES ('com.atlassian.jira.upgrade.tasks.UpgradeTask_Build70109', 35)"; SQL statement:
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:102)
at org.h2.mvstore.db.MVSecondaryIndex.add(MVSecondaryIndex.java:203)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:637)
at org.h2.command.dml.Insert.insertRows(Insert.java:156)
at org.h2.command.dml.Insert.update(Insert.java:114)
at org.h2.command.CommandContainer.update(CommandContainer.java:78)
at org.h2.command.Command.executeUpdate(Command.java:254)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:157)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:143)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:673)
... 38 more
2019-05-02 13:36:09,509 localhost-startStop-1 ERROR [c.a.jira.upgrade.UpgradeManagerImpl] Errors occurred during upgrade:
2019-05-02 13:36:09,509 localhost-startStop-1 ERROR [c.a.jira.upgrade.UpgradeManagerImpl] Upgrade Error: There was a problem adding Upgrade Task Deleting invalid version associations. to the Upgrade History. This means the state of the system may be out of sync with the upgrade history, which could result in missed downgrade tasks for future exports.
2019-05-02 13:36:09,509 localhost-startStop-1 WARN [c.a.j.p.d.dao.impl.CachingOrganizationDaoImpl] onImportCompleted - clearing cache !!
2019-05-02 13:36:09,509 localhost-startStop-1 INFO [c.a.j.bc.dataimport.DefaultDataImportService] JIRA Data Import has finished.
2019-05-02 13:36:09,509 localhost-startStop-1 ERROR [c.a.jira.startup.LauncherContextListener] Unable to start JIRA.
java.lang.RuntimeException: com.atlassian.core.AtlassianCoreException: Error messages:
Errors:
Import error:
UPGRADE_EXCEPTION - There was a problem adding Upgrade Task Deleting invalid version associations. to the Upgrade History. This means the state of the system may be out of sync with the upgrade history, which could result in missed downgrade tasks for future exports.

at com.atlassian.jira.startup.EmbeddedDatabaseMigrator.importAndContinue(EmbeddedDatabaseMigrator.java:139)
at com.atlassian.jira.startup.EmbeddedDatabaseMigrator.start(EmbeddedDatabaseMigrator.java:57)
at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$2(DefaultJiraLauncher.java:137)
at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$16/2124851696.run(Unknown Source)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:298)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:194)
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:121)
at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$0(DefaultJiraLauncher.java:90)
at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$2/616284041.run(Unknown Source)
at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31)
at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:88)
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:79)
... 5 filtered
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.core.AtlassianCoreException: Error messages:
Errors:
Import error:
UPGRADE_EXCEPTION - There was a problem adding Upgrade Task Deleting invalid version associations. to the Upgrade History. This means the state of the system may be out of sync with the upgrade history, which could result in missed downgrade tasks for future exports.

at com.atlassian.jira.startup.EmbeddedDatabaseMigrator.importAndContinue(EmbeddedDatabaseMigrator.java:138)
2019-05-02 13:37:11,847 hipchat-plugin-tasks-executor-0 DEBUG [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] getService bundle [com.atlassian.plugins.base-hipchat-integration-plugin-api]

2 answers

1 vote
calvin.dike June 13, 2019

If you were using the inbuilt database moving/removing the hsql-migration.zip file from the directory  /var/atlassian/application-data/jira/export/  solves the issue.

Nico Carrivale
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2019

Thanks! that solved my problem. Best.

0 votes
Andrew
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2019
jira
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2019

Hi,

First step 

  1. Install JIRA 6.4.11 using the installer. Complete the setup process through the browser as well, then shut down JIRA.
  2. Upgrade the installation in step 1 using any JIRA 7.0.x version installer.

but I don't have 6.4.11. Where do I download?

Andrew
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2019

I think You can try workaround.

Restart a couple more times...

Are You lucky? :-)

B.R.

Suggest an answer

Log in or Sign up to answer