Confluence label autocomplete does not work in a certain page

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

When adding a label into a page, the autocomplete does not show any label even the label have been added into other page. The label autocomplete does shows in other pages.

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 7 8 ERROR [http-nio-8090-exec-18] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- referer: https://mycompany.com/display/TEST/Test+Page | url: /labels/autocompletelabel.action | userName: test java.lang.NullPointerException at com.atlassian.confluence.plugins.labels.actions.AutocompleteLabelsAction.filterLabelsByQuery(AutocompleteLabelsAction.java:192) at com.atlassian.confluence.plugins.labels.actions.AutocompleteLabelsAction.getSuggestedLabels(AutocompleteLabelsAction.java:133) at com.atlassian.confluence.plugins.labels.actions.AutocompleteLabelsAction.findLabels(AutocompleteLabelsAction.java:101) at com.atlassian.confluence.plugins.labels.actions.AutocompleteLabelsAction.execute(AutocompleteLabelsAction.java:77) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)

Diagnosis

Diagnostic Steps

Run the following database query in your Confluence database:

1. Verify if there is a label with empty name.

1 select * from LABEL where NAME is null and OWNER is null;

2. Verify if there is content associated to that label.

1 select * from CONTENT_LABEL where LABELID=<labelid_from_query_above>;
1 select TITLE from CONTENT where CONTENTID=<contentid>;

If the first query return any result, this may trigger the issue with label autocomplete in the affected pages as return in the

second query

.

Cause

The issue is caused by the label with empty name by checking the result from the database query in the diagnostic step.

Solution

Resolution

Please run the following database query in order to delete the label:

1 delete from CONTENT_LABEL where LABELID = <labelid_from_first_query>;
1 delete from LABEL where LABELID = <labelid_from_first_query>;

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.