java.lang.NullPointerException

Atlassian JIRA | Ajay Sridhar [Atlassian] | 7 years ago
  1. 0

    Having null labels in the database throws the exception - {code} java.lang.NullPointerException at java.lang.String.compareTo(String.java:1168) at com.atlassian.confluence.labels.actions.RankedNameComparator.compare(RankedNameComparator.java:13) at java.util.TreeMap.put(TreeMap.java:530) at java.util.TreeSet.add(TreeSet.java:238) at com.atlassian.confluence.labels.DefaultLabelManager.getRankedLabels(DefaultLabelManager.java:463) at com.atlassian.confluence.labels.DefaultLabelManager.getMostPopularLabelsWithRanksInSpace(DefaultLabelManager.java:449) {code} Currently, there is no constraint in the Database which disallows null labels - we should check for nulls. One of the known cause of this is due to [Checklist Macros plugin|https://marketplace.atlassian.com/plugins/com.comalatech.checklists]'s bug [CHK-68|https://studio.plugins.atlassian.com/browse/CHK-68]. h3. Workaround You can delete the null label from the database by: # *Backup your database* # Run this query to find the label id of the null label. {code:sql} select LABELID from LABEL where NAME is null; {code} # Run this query to delete all the null label from the CONTENT_LABEL table. Replace the <LABEL_ID> with the labelid of the null label. {code:sql} DELETE FROM CONTENT_LABEL WHERE LABELID=<LABEL_ID> {code} # Run this query to delete all the null label from the LABEL table. {code:sql} DELETE FROM LABEL WHERE LABELID=<LABEL_ID> {code} # Restart Confluence

    Atlassian JIRA | 7 years ago | Ajay Sridhar [Atlassian]
    java.lang.NullPointerException
  2. 0

    Having null labels in the database throws the exception - {code} java.lang.NullPointerException at java.lang.String.compareTo(String.java:1168) at com.atlassian.confluence.labels.actions.RankedNameComparator.compare(RankedNameComparator.java:13) at java.util.TreeMap.put(TreeMap.java:530) at java.util.TreeSet.add(TreeSet.java:238) at com.atlassian.confluence.labels.DefaultLabelManager.getRankedLabels(DefaultLabelManager.java:463) at com.atlassian.confluence.labels.DefaultLabelManager.getMostPopularLabelsWithRanksInSpace(DefaultLabelManager.java:449) {code} Currently, there is no constraint in the Database which disallows null labels - we should check for nulls. One of the known cause of this is due to [Checklist Macros plugin|https://marketplace.atlassian.com/plugins/com.comalatech.checklists]'s bug [CHK-68|https://studio.plugins.atlassian.com/browse/CHK-68]. h3. Workaround You can delete the null label from the database by: # *Backup your database* # Run this query to find the label id of the null label. {code:sql} select LABELID from LABEL where NAME is null; {code} # Run this query to delete all the null label from the CONTENT_LABEL table. Replace the <LABEL_ID> with the labelid of the null label. {code:sql} DELETE FROM CONTENT_LABEL WHERE LABELID=<LABEL_ID> {code} # Run this query to delete all the null label from the LABEL table. {code:sql} DELETE FROM LABEL WHERE LABELID=<LABEL_ID> {code} # Restart Confluence

    Atlassian JIRA | 7 years ago | Ajay Sridhar [Atlassian]
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    User Login Problem...

    Oracle Community | 7 years ago | mustang444
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at java.lang.String.compareTo()
    2. Java RT
      String.compareTo
      1. java.lang.String.compareTo(String.java:1168)
      1 frame
    3. com.atlassian.confluence
      RankedNameComparator.compare
      1. com.atlassian.confluence.labels.actions.RankedNameComparator.compare(RankedNameComparator.java:13)
      1 frame
    4. Java RT
      TreeSet.add
      1. java.util.TreeMap.put(TreeMap.java:530)
      2. java.util.TreeSet.add(TreeSet.java:238)
      2 frames
    5. com.atlassian.confluence
      DefaultLabelManager.getMostPopularLabelsWithRanksInSpace
      1. com.atlassian.confluence.labels.DefaultLabelManager.getRankedLabels(DefaultLabelManager.java:463)
      2. com.atlassian.confluence.labels.DefaultLabelManager.getMostPopularLabelsWithRanksInSpace(DefaultLabelManager.java:449)
      2 frames