Upgrading to JIRA 6.1 Fails Due To Duplicate Project Keys

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When upgrading to JIRA 6.1 or later process stops and the following appears in the atlassian-jira.log:

INFO      [atlassian.jira.upgrade.UpgradeManagerImpl] Performing Upgrade Task: Create table tracking historical Project keys
...
ERROR      [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ProjectKey]... (SQL Exception while executing the following:INSERT INTO PUBLIC.project_key (ID, PROJECT_ID, PROJECT_KEY) VALUES (?, ?, ?) (Violation of unique index: IDX_ALL_PROJECT_KEYS in statement [INSERT INTO PUBLIC.project_key (ID, PROJECT_ID, PROJECT_KEY) VALUES (?, ?, ?)]))

原因

There is more than one project in PROJECT table with the same project key. Following sql will return list of offending project keys.

SELECT pkey, COUNT(*) FROM project GROUP BY pkey HAVING COUNT(*) > 1;

 

ソリューション

データベースの変更を行う場合は 必ず事前にバックアップを取得してください。可能な場合はテスト サーバーで変更を試すことをおすすめします。

  1. Find offending projects. You can use following sql to find those projects. Replace TEST with duplicated project key.

    SELECT * FROM project WHERE pkey = 'TEST';
  2. Resolve key conflicts. You can either remove unused project or change one of project keys.
  3. Repeat steps 2-3 for all duplicated keys.
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.