Template NullPointerException when visiting Confluence after space import

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

After importing a space, a user may see the following error when visiting Confluence:

1 2 3 Error occurred during template rendering: Invocation of method 'getRenderedParam' in class com.atlassian.plugin.web.model.DefaultWebParam threw exception java.lang.NullPointerException at template/includes/menu-macros.vm[line 67, column 50]. Contact your administrator for assistance.

Diagnosis

Environment

  • Confluence 5.7

  • Other versions of Confluence may be affected

Diagnostic Steps

  1. Run the following command against the database.

    1 select * from spaces where spacename is NULL;
  2. If results are returned, please proceed below.

Cause

A space has been imported into Confluence that has no Space Name. CONFSERVER-39517 - Space Imports with SpaceName the same as SpaceKey cause Template NullPointerException

Solution

Resolution

Change Space Name

  1. Open your Confluence instance;

  2. Go to Space > Space Directory;

  3. Look for spaces with the name set as 'Undefined';

  4. Change the space name.

Modify Data

  1. Stop Confluence

  2. In the database, run:

    1 update spaces set spacename='SPACE_NAME' where spaceid=XXXXXX; 

    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.

    Where XXXXXX is the spaceid from the results returned in your Diagnosis, and the SPACE_NAME is set to the desired space name.

  3. Start Confluence

  4. Rebuild the search index

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.