Exception thrown during upgrade

This question is in reference to Atlassian Documentation: Upgrading JIRA applications using a rapid upgrade method

After upgrade JIRA 6.2 to 7.0.2 an error:

Exception thrown during upgrade: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:GlobalPermissionEntry][group_id,jira-Collages_Mobile][permission,USE][id,10000] (SQL Exception while executing the following:INSERT INTO globalpermissionentry (ID, PERMISSION, GROUP_ID) VALUES (?, ?, ?) (Duplicate entry '10000' for key 'PRIMARY'))
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:GlobalPermissionEntry][group_id,jira-Collages_Mobile][permission,USE][id,10000] (SQL Exception while executing the following:INSERT INTO globalpermissionentry (ID, PERMISSION, GROUP_ID) VALUES (?, ?, ?) (Duplicate entry '10000' for key 'PRIMARY'))
    at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:299)
    at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:172)
    at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build6304.migrateValue(UpgradeTask_Build6304.java:94)
    at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build6304.doUpgrade(UpgradeTask_Build6304.java:82)
    at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSuccess(UpgradeManagerImpl.java:698)
    at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:589)
    at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:473)
    at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:415)
    at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:359)
    at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:90)
    at com.atlassian.jira.upgrade.UpgradeLauncher.start(UpgradeLauncher.java:47)
    at com.atlassian.jira.startup.ActiveServicesLauncher.start(ActiveServicesLauncher.java:49)
    at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$468(DefaultJiraLauncher.java:133)
    at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$14/863407471.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:120)
    at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$466(DefaultJiraLauncher.java:89)
    at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$1/415707317.run(Unknown Source)
    at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31)
    at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:87)
    at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:79)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4710)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
    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: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:GlobalPermissionEntry][group_id,jira-Collages_Mobile][permission,USE][id,10000] (SQL Exception while executing the following:INSERT INTO globalpermissionentry (ID, PERMISSION, GROUP_ID) VALUES (?, ?, ?) (Duplicate entry '10000' for key 'PRIMARY'))
    at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:213)
    at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:178)
    at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:83)
    at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:556)
    at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:542)
    at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:97)
    at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:296)
    ... 30 more
Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO globalpermissionentry (ID, PERMISSION, GROUP_ID) VALUES (?, ?, ?) (Duplicate entry '10000' for key 'PRIMARY')
    at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:684)
    at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:205)
    ... 36 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10000' for key 'PRIMARY'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2362)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2280)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2265)
    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:674)
    ... 37 more

 

Trying to fix the team to no avail:

UPDATE SEQUENCE_VALUE_ITEM SET seq_id=(SELECT max(id)+100 FROM globalpermissionentry) WHERE seq_name='10000';

 

https://confluence.atlassian.com/display/JIRAKB/Duplicated+entry+-+unique+constraint+violated

1 answer

You might try contacting Atlassian Support:  https://support.atlassian.com/customer/servicedesk-portal

Regards,

 

Kay

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

84 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you