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

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

Summary

Symptoms

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)

Diagnosis

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.

Cause

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

Solution

Workaround

  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.

Resolution

Track the resolution at JRASERVER-22362 - Issue with 4.2 upgrade.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.