'Unable to Find Resource navmap-mytheme.vm' Error Due to Navmap Custom Setting

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

Symptoms

The following appears in the atlassian-confluence.log:

1 2 3 4 org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/templates/macros/navmap-mytheme.vm' at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:501) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)

Cause

If you are using a Navigation Map Macro with a theme, like:

1 2 {navmap:mylabel|theme=mytheme}

Confluence looks for pages with the label set to "mylabel" and locate the navmap-mytheme.vm file in WEB-INF/classes/templates/macros directory. If the vm file does not exist, Confluence will throw the above error saying that it is unable to find the file.

Such error usually happens due to a copy and paste of the macro from the documentation page when testing for the macro functionality. A user might be using the macro without knowing that it refers to a custom setting for navmap macro, which is defined in the vm file.

Resolution

Remove the reference to the file if you are not using a customised navmap macro.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.