Error Loading Macro Browser due to corrupted plugin cache
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 macro browser when editing a page no longer comes up correctly. Users may see an error message in the browser: "There has been an error loading the macro browser." Additionally, when viewing the "User Macros" page in Confluence Administration, a system error may appear.
The following appears in the atlassian-confluence.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2013-01-30 17:11:21,103 ERROR [http-8090-10] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
-- url: /plugins/macrobrowser/browse-macros.action | userName: XXXXXXXX | referer: https://BASE_URL/page
java.lang.NullPointerException
at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:32)
at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java:99)
at com.atlassian.confluence.plugin.descriptor.XhtmlMacroModuleDescriptor$1.createModule(XhtmlMacroModuleDescriptor.java:47)
at com.atlassian.confluence.plugin.descriptor.XhtmlMacroModuleDescriptor$1.createModule(XhtmlMacroModuleDescriptor.java:43)
at com.atlassian.confluence.plugin.module.PluginModuleHolder.createModule(PluginModuleHolder.java:78)
at com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:99)
at com.atlassian.confluence.plugin.descriptor.XhtmlMacroModuleDescriptor.getModule(XhtmlMacroModuleDescriptor.java:99)
at com.atlassian.confluence.macro.browser.DefaultMacroMetadataProvider.getMacroBodyType(DefaultMacroMetadataProvider.java:147)
at com.atlassian.confluence.macro.browser.DefaultMacroMetadataProvider.makeMetadata(DefaultMacroMetadataProvider.java:105)
at com.atlassian.confluence.macro.browser.DefaultMacroMetadataProvider.loadMacroMetadata(DefaultMacroMetadataProvider.java:56)
at com.atlassian.confluence.macro.browser.DefaultMacroMetadataProvider.getData(DefaultMacroMetadataProvider.java:32)
at com.atlassian.confluence.macro.browser.DelegatingMacroMetadataProvider.getData(DelegatingMacroMetadataProvider.java:25)
at com.atlassian.confluence.macro.browser.DefaultMacroMetadataManager.buildMacroMetadata(DefaultMacroMetadataManager.java:49)
at com.atlassian.confluence.macro.browser.DefaultMacroMetadataManager.getAllMacroMetadata(DefaultMacroMetadataManager.java:27)
at com.atlassian.confluence.macro.browser.DefaultMacroBrowserManager.getMacroMetadata(DefaultMacroBrowserManager.java:38)
at com.atlassian.confluence.macro.browser.actions.BrowseMacrosAction.execute(BrowseMacrosAction.java:22)
...
The following may appear in the System Error and/or logs:
1
2
3
4
5
6
7
8
9
10
11
12
13
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'countUserMacrosWithoutMetadata' in class com.atlassian.confluence.admin.actions.macros.UserMacroAction threw exception java.lang.NullPointerException at /admin/macros/viewusermacros.vm[line 14, column 51]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
at org.apache.velocity.runtime.parser.node.ASTGTNode.evaluate(ASTGTNode.java:80)
at org.apache.velocity.runtime.parser.node.ASTGTNode.value(ASTGTNode.java:145)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.Template.merge(Template.java:328)
at org.apache.velocity.Template.merge(Template.java:235)
...
Cause
The plugins cache has become corrupted, causing Confluence to get a NullPointerException when trying to access parts of the plugin. This can sometimes happen after upgrading from a version of Confluence before 4.0 to 4.0 or above, but there are a variety of reasons that this could happen.
Resolution
Was this helpful?