org.apache.velocity.exception.MethodInvocationException: 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] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116)

Atlassian JIRA | Ivan Maduro | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary If a user imports a space where the Spacename is exactly the same as the SpaceKey (eg: WOW / WOW) then once the import is complete a Template error is shown on all pages in Confluence h3. Steps to Reproduce # Create a Space with the following name and key: _name_: WOW _key_: WOW ** Make sure they are both in full capital letters # Create a full Space Export # Import this Space into a different instance h3. Expected Results Once the import is complete the user should be taken to the Space h3. Actual Results Each Confluence page now shows the following error: {noformat} 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. {noformat} The below exception is thrown in the Confluence log file: {noformat} @4000000056164e301e5c4144 org.apache.velocity.exception.MethodInvocationException: 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] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116) @4000000056164e301e6096a4 at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351) @4000000056164e301e6096a4 at java.util.TimSort.sort(TimSort.java:216) @4000000056164e301e6096a4 at java.util.Arrays.sort(Arrays.java:1512) @4000000056164e301e609e74 at java.util.ArrayList.sort(ArrayList.java:1454) @4000000056164e301e609e74 at java.util.Collections.sort(Collections.java:175) @4000000056164e301e60a25c at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getOtherSpaces(DefaultSpaceCollectionService.java:115) @4000000056164e301e60a25c at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getSpaces(DefaultSpaceCollectionService.java:69) @4000000056164e301e60aa2c at com.atlassian.confluence.plugins.createcontent.contextproviders.QuickCreateUrlContextProvider.getContextMap(QuickCreateUrlContextProvider.java:65) @4000000056164e301e60c96c at com.atlassian.plugin.web.model.AbstractWebItem.getContextMap(AbstractWebItem.java:30) @4000000056164e301e60c96c at com.atlassian.plugin.web.model.DefaultWebParam.getRenderedParam(DefaultWebParam.java:48) {noformat} h3.Workaround To set a name to the space that is now showing as "undefined" *Workaround 1:* # Go to Space > Space Directory: <confluence-site>/spacedirectory/view.action # Look for spaces with the name set as 'undefined'; # Click the space name to go to the space # Select: Space Tools -> Overview # Edit Space Details to set a Name *Workaround 2:* If it's not possible to navigate to set a space name. # Run the following command against the database {noformat} select * from spaces where spacename is NULL; {noformat} # Stop Confluence # Backup Confluence database # In the database, run: {noformat}update spaces set spacename='SPACE_NAME' where spaceid=XXXXXX;{noformat} _Where XXXXXX is the spaceid from the results returned in your Diagnosis, and the SPACE_NAME is set to the desired space name._ # Start Confluence # Re-index Confluence

    Atlassian JIRA | 2 years ago | Ivan Maduro
    org.apache.velocity.exception.MethodInvocationException: 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] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116)
  2. 0

    h3. Summary If a user imports a space where the Spacename is exactly the same as the SpaceKey (eg: WOW / WOW) then once the import is complete a Template error is shown on all pages in Confluence h3. Steps to Reproduce # Create a Space with the following name and key: _name_: WOW _key_: WOW ** Make sure they are both in full capital letters # Create a full Space Export # Import this Space into a different instance h3. Expected Results Once the import is complete the user should be taken to the Space h3. Actual Results Each Confluence page now shows the following error: {noformat} 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. {noformat} The below exception is thrown in the Confluence log file: {noformat} @4000000056164e301e5c4144 org.apache.velocity.exception.MethodInvocationException: 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] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116) @4000000056164e301e6096a4 at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351) @4000000056164e301e6096a4 at java.util.TimSort.sort(TimSort.java:216) @4000000056164e301e6096a4 at java.util.Arrays.sort(Arrays.java:1512) @4000000056164e301e609e74 at java.util.ArrayList.sort(ArrayList.java:1454) @4000000056164e301e609e74 at java.util.Collections.sort(Collections.java:175) @4000000056164e301e60a25c at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getOtherSpaces(DefaultSpaceCollectionService.java:115) @4000000056164e301e60a25c at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getSpaces(DefaultSpaceCollectionService.java:69) @4000000056164e301e60aa2c at com.atlassian.confluence.plugins.createcontent.contextproviders.QuickCreateUrlContextProvider.getContextMap(QuickCreateUrlContextProvider.java:65) @4000000056164e301e60c96c at com.atlassian.plugin.web.model.AbstractWebItem.getContextMap(AbstractWebItem.java:30) @4000000056164e301e60c96c at com.atlassian.plugin.web.model.DefaultWebParam.getRenderedParam(DefaultWebParam.java:48) {noformat} h3.Workaround To set a name to the space that is now showing as "undefined" *Workaround 1:* # Go to Space > Space Directory: <confluence-site>/spacedirectory/view.action # Look for spaces with the name set as 'undefined'; # Click the space name to go to the space # Select: Space Tools -> Overview # Edit Space Details to set a Name *Workaround 2:* If it's not possible to navigate to set a space name. # Run the following command against the database {noformat} select * from spaces where spacename is NULL; {noformat} # Stop Confluence # Backup Confluence database # In the database, run: {noformat}update spaces set spacename='SPACE_NAME' where spaceid=XXXXXX;{noformat} _Where XXXXXX is the spaceid from the results returned in your Diagnosis, and the SPACE_NAME is set to the desired space name._ # Start Confluence # Re-index Confluence

    Atlassian JIRA | 2 years ago | Ivan Maduro
    org.apache.velocity.exception.MethodInvocationException: 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] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116)

    Root Cause Analysis

    1. org.apache.velocity.exception.MethodInvocationException

      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] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116)

      at java.util.TimSort.countRunAndMakeAscending()
    2. Java RT
      Arrays.sort
      1. java.util.TimSort.countRunAndMakeAscending(TimSort.java:351)
      2. java.util.TimSort.sort(TimSort.java:216)
      3. java.util.Arrays.sort(Arrays.java:1512)
      3 frames