'java.lang.IndexOutOfBoundsException' during Upgrade Due to Invalid Field Association

お困りですか?

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

コミュニティに質問

症状

When performing an upgrade using an XML backup, JIRA does not start up correctly and the following error is displayed:

Exception thrown during upgrade: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.atlassian.jira.issue.fields.screen.FieldScreenImpl.getTab(FieldScreenImpl.java:99)
at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build551.doUpgrade(UpgradeTask_Build551.java:44)

診断

To confirm, run the following SQL query on the database:

SELECT * FROM fieldscreentab INNER JOIN fieldscreen ON (fieldscreentab.FIELDSCREEN = fieldscreen.ID) WHERE fieldscreen.NAME = 'Default Screen' ;

If no results are return, the issue is confirmed.

原因

The default screen (table fieldscreen) did not have and associated screen tab record in the table fieldscreentab.

回避策

  1. Run this query and record the result:

    SELECT max(id) FROM fieldscreentab f;
    
  2. Run this query and record the result:

    SELECT id FROM fieldscreen where name="Default Screen";
    
  3. Open the XML backup in a text editor
  4. Search for <FileAttachment id=
  5. Right above that entry, include this one:

    <FieldScreenTab id="<result from query 1>" name="Field Tab" sequence="0" fieldscreen="<result from query 2>" />
    
  6. Save the file and re-import the backup.

ソリューション

Track the resolution at JRA-22362.

Last modified on Mar 30, 2016

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

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