Bugzilla importer: NullPointerException when version is invalid

XMLWordPrintable

    • 3.06

      We have come across a Bugzilla database with a project that fails to import, breaking with:

      Error importing data from Bugzilla: java.lang.NullPointerException at com.atlassian.jira.project.version.DefaultVersionManager.getVersion(DefaultVersionManager.java:464) at com.atlassian.jira.util.BugzillaImportBean.createVersion(BugzillaImportBean.java:870) at com.atlassian.jira.util.BugzillaImportBean.createVersionFromVersionTable(BugzillaImportBean.java:785) at com.atlassian.jira.util.BugzillaImportBean.createVersions(BugzillaImportBean.java:767) at com.atlassian.jira.util.BugzillaImportBean.create(BugzillaImportBean.java:198) at com.atlassian.jira.web.action.util.BugzillaImport.doRun(BugzillaImport.java:150) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
      ...

      It turns out this is because there is a versions table record:

      +-------------+-----------+
      | value       | program   |
      +-------------+-----------+
      | unspecified | app:AUdIT | 
      +-------------+-----------+
      1 row in set (0.00 sec)
      

      But the products.product column value is actually app:AUDIT:

      mysql> select product from products where product like 'app:AUdiT';
      +-----------+
      | product   |
      +-----------+
      | app:AUDIT | 
      +-----------+
      

      1 row in set (0.03 sec)

      The case difference doesn't matter to Bugzilla, because MySQL is case-insensitive. However the JIRA importer puts the product name in a case-sensitive map, and so it breaks.

        1. BugzillaImportBean.java
          65 kB
        2. jra11466fix.diff
          2 kB
        3. jra11466fix.jar
          23 kB

              Assignee:
              Dylan Etkin [Atlassian]
              Reporter:
              Jeff Turner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: