Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-5244

Importing invalid XML prints irrelevant error

    XMLWordPrintable

Details

    Description

      If I try to import a JIRA XML backup that is invalid (because it contains a control characters), the import fails with the message:

      Failed to import data: Error in action: com.atlassian.jira.action.admin.DataImport@b2c64, result: error Exception occurred: java.lang.IndexOutOfBoundsException: Index: -1, Size: 0

      and stacktrace:

      2004-11-17 16:36:12,743 ERROR [jira.action.admin.DataImport] Exception occurred: java.lang.IndexOutOfBoundsException: Index: -1, Size: 0
      java.lang.IndexOutOfBoundsException: Index: -1, Size: 0
      at java.util.LinkedList.entry(LinkedList.java:360)
      at java.util.LinkedList.get(LinkedList.java:303)
      at com.atlassian.jira.action.admin.DataImport.processException(DataImport.java:199)
      at com.atlassian.jira.action.admin.DataImport.doExecute(DataImport.java:91)
      at webwork.action.ActionSupport.execute(ActionSupport.java:151)
      at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:46)

      As the stacktrace suggests, the error has nothing to do with the invalid character, but is actually a bug in JIRA's error handling code.

      Attachments

        Activity

          People

            7ee5c68a815f Jeff Turner
            7ee5c68a815f Jeff Turner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: