java.lang.NullPointerException

Atlassian JIRA | Jeff Turner | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    A user has reported the following error when importing JIRA 2.0.2 data. The reindex after the upgrade fails with a NullPointerException: 2003-11-17 15:51:41,113 WARN [jira.issue.index.DefaultIndexManager] There was an exception whilst reindexing issue XYZjava.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.issue.comparator.CustomFieldComparator.compareProjects(CustomFieldComparator.java:100) at com.atlassian.jira.issue.comparator.CustomFieldComparator.compare(CustomFieldComparator.java:41) at java.util.Arrays.mergeSort(Arrays.java:1241) at java.util.Arrays.mergeSort(Arrays.java:1248) at java.util.Arrays.mergeSort(Arrays.java:1248) at java.util.Arrays.sort(Arrays.java:1188) at java.util.Collections.sort(Collections.java:153) at com.atlassian.jira.issue.managers.DefaultCustomFieldManager.getCustomFieldsFromDB(DefaultCustomFieldManager.j ava:238) at com.atlassian.jira.issue.managers.DefaultCustomFieldManager.populateCache(DefaultCustomFieldManager.java:360) at com.atlassian.jira.issue.managers.DefaultCustomFieldManager.getCustomField(DefaultCustomFieldManager.java:84) at com.atlassian.jira.issue.index.IssueDocument.getDocument(IssueDocument.java:79) at com.atlassian.jira.issue.index.DefaultIndexManager.indexIssueAndComments(DefaultIndexManager.java:186) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:113) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:76) at com.atlassian.jira.upgrade.tasks.AbstractReindexUpgradeTask.doUpgrade(AbstractReindexUpgradeTask.java:17) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:565) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:318) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:264) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:252) at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:70) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3271) It looks like back in 2.0.2, JIRA did not delete a project's custom fields when deleting the project. As a result there are custom fields floating around without an associated project, and this kills indexing.

    Atlassian JIRA | 1 decade ago | Jeff Turner
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.issue.comparator.CustomFieldComparator.compareProjects()
    2. com.atlassian.jira
      CustomFieldComparator.compare
      1. com.atlassian.jira.issue.comparator.CustomFieldComparator.compareProjects(CustomFieldComparator.java:100)
      2. com.atlassian.jira.issue.comparator.CustomFieldComparator.compare(CustomFieldComparator.java:41)
      2 frames
    3. Java RT
      Collections.sort
      1. java.util.Arrays.mergeSort(Arrays.java:1241)
      2. java.util.Arrays.mergeSort(Arrays.java:1248)
      3. java.util.Arrays.mergeSort(Arrays.java:1248)
      4. java.util.Arrays.sort(Arrays.java:1188)
      5. java.util.Collections.sort(Collections.java:153)
      5 frames
    4. com.atlassian.jira
      UpgradeLauncher.contextInitialized
      1. com.atlassian.jira.issue.managers.DefaultCustomFieldManager.getCustomFieldsFromDB(DefaultCustomFieldManager.java:238)
      2. com.atlassian.jira.issue.managers.DefaultCustomFieldManager.populateCache(DefaultCustomFieldManager.java:360)
      3. com.atlassian.jira.issue.managers.DefaultCustomFieldManager.getCustomField(DefaultCustomFieldManager.java:84)
      4. com.atlassian.jira.issue.index.IssueDocument.getDocument(IssueDocument.java:79)
      5. com.atlassian.jira.issue.index.DefaultIndexManager.indexIssueAndComments(DefaultIndexManager.java:186)
      6. com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:113)
      7. com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:76)
      8. com.atlassian.jira.upgrade.tasks.AbstractReindexUpgradeTask.doUpgrade(AbstractReindexUpgradeTask.java:17)
      9. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:565)
      10. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:318)
      11. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:264)
      12. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:252)
      13. com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:70)
      13 frames
    5. Glassfish Core
      StandardContext.listenerStart
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3271)
      1 frame