JIRA Restore failing with java.lang.NullPointerException

XMLWordPrintable

    • 7.01
    • 9
    • Severity 3 - Minor
    • 0

      Summary

      Performing a JIRA restore from an xml backup is failing with java.lang.NullPointerException when there is a long string in the field : 'oldstring' for 'changeitem' table.
      JIRA does not provide any helpful logging here to help determine why the restore failed. We need to have better logging for this failure.

      Steps to Reproduce

      1. Restore a backup of JIRA from Administration > System > Restore System

      Expected Results

      Restore finishes successfully

      Actual Results

      Restore fails but without giving any reason why it failed
      The below exception is thrown in the atlassian-jira.log file:

      2017-04-05 17:34:16,441 http-nio-8351-exec-17 ERROR      [o.a.c.c.C.[.[localhost].[/JSP-283501].[default]] Servlet.service() for servlet [default] in context with path [/JSP-xxxx] threw exception
      java.lang.NullPointerException
      	at com.atlassian.jira.web.filters.JiraImportProgressFilter.doFilter(JiraImportProgressFilter.java:130)
      	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      	... 11 filtered
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)

      Workaround

      1. Enable TRACE logging on the class 'com.atlassian.jira.bc.dataimport' and 'com.atlassian.jira.imports'
      2. Now start the restore
      3. When the restore fails, look through the atlassian-jira.log file to determine which record it was reading from entities.xml
      4. Open the entities.xml file to see that row. That should help to find where the restore is failing.

      Notes

      The issue was mitigated in versions 7.3.7 and 7.4.0. Jira will now report any unexpected failure during data import
      that is from 20% to 90% of import progress. Problems that happen outside of this range can still be not printed in log. Example: out of memory during XML parsing.

            Assignee:
            Przemyslaw Czuj (Inactive)
            Reporter:
            Ruchi Tandon (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: