Details
-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
3.0.1, 3.0.2, 4.2.8
-
None
Description
Having null labels in the database throws the exception -
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)
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's bug CHK-68.
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.
select LABELID from LABEL where NAME is null;
- 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.
DELETE FROM CONTENT_LABEL WHERE LABELID=<LABEL_ID>
- Run this query to delete all the null label from the LABEL table.
DELETE FROM LABEL WHERE LABELID=<LABEL_ID>
- Restart Confluence
Attachments
Issue Links
- mentioned in
-
Page Loading...