java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When using the User Lister Macro to display group that doesn't exists, an unhandled null pointer exception will be raised in com.atlassian.user.search.page.PagerUtils.toList() method. Example wiki markup to trigger the bug: {userlister:groups=nosuchgroup} On the rendered wiki page, the macro is expanded to the error message: Error formatting macro: userlister: java.lang.NullPointerException Relevant parts of the stack trace: [15:40:13.959] 2007-07-09 15:40:13,955 ERROR [resin-tcp-connection-*:7811-13] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: userlister [15:40:13.959] -- url: /wiki-devel/display/SAND/Home | userName: tj | action: viewpage | page: 268 [15:40:13.959] java.lang.NullPointerException [15:40:13.959] at com.atlassian.user.search.page.PagerUtils.toList(PagerUtils.java:25) [15:40:13.959] at com.atlassian.confluence.extra.userlister.model.UserList.getGroupUsers(UserList.java:91) [15:40:13.959] at com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:39) [15:40:13.959] at com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:79) [15:40:13.959] at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:340) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:241) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:130) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.handlePotentialMacro(MacroRendererComponent.java:115) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:77) [15:40:13.959] at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:54) [15:40:13.959] at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) [ .... ] The method com.atlassian.user.search.page.PagerUtils.toList() should check that the Pager argument is not null before invoking methods of the object and either return null if the argument was null or throw an IllegalArgumentException (in which case the possible errors should be avoided by checking the nullness of the argument in each instances where com.atlassian.user.search.page.PagerUtils.toList() is invoked prior the invocation). See the attached patch.
    via by Tuomas Jormola,
  • When using the User Lister Macro to display group that doesn't exists, an unhandled null pointer exception will be raised in com.atlassian.user.search.page.PagerUtils.toList() method. Example wiki markup to trigger the bug: {userlister:groups=nosuchgroup} On the rendered wiki page, the macro is expanded to the error message: Error formatting macro: userlister: java.lang.NullPointerException Relevant parts of the stack trace: [15:40:13.959] 2007-07-09 15:40:13,955 ERROR [resin-tcp-connection-*:7811-13] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: userlister [15:40:13.959] -- url: /wiki-devel/display/SAND/Home | userName: tj | action: viewpage | page: 268 [15:40:13.959] java.lang.NullPointerException [15:40:13.959] at com.atlassian.user.search.page.PagerUtils.toList(PagerUtils.java:25) [15:40:13.959] at com.atlassian.confluence.extra.userlister.model.UserList.getGroupUsers(UserList.java:91) [15:40:13.959] at com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:39) [15:40:13.959] at com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:79) [15:40:13.959] at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:340) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:241) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:130) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.handlePotentialMacro(MacroRendererComponent.java:115) [15:40:13.959] at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:77) [15:40:13.959] at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:54) [15:40:13.959] at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) [ .... ] The method com.atlassian.user.search.page.PagerUtils.toList() should check that the Pager argument is not null before invoking methods of the object and either return null if the argument was null or throw an IllegalArgumentException (in which case the possible errors should be avoided by checking the nullness of the argument in each instances where com.atlassian.user.search.page.PagerUtils.toList() is invoked prior the invocation). See the attached patch.
    via by Tuomas Jormola,
  • Steps to reproduce: # Allow anonymous browsing at the global level. # Create a space and allow anonymous browsing for that space. # Add label "test" to the home page. # Add the {{popular}} macro to the home page: {code} {popular:labels=test} {code} # Log out and view the home page of the new space. Specific error message on page is: {code} Error in macro: java.lang.NullPointerException {code} and logs contain the following error (snipped}: {code} java.lang.NullPointerException at com.atlassian.user.search.page.PagerUtils.toList(PagerUtils.java:26) at com.atlassian.confluence.search.lucene.filter.ContentPermissionsFilter.<init>(ContentPermissionsFilter.java:54) at com.atlassian.confluence.ext.usage.index.UsageIndexManager$3.perform(UsageIndexManager.java:276) at com.atlassian.bonnie.LuceneConnection.withSearch(LuceneConnection.java:260) at com.atlassian.confluence.ext.usage.index.UsageIndexManager.queryPopular(UsageIndexManager.java:272) at com.atlassian.confluence.ext.usage.macros.PopularMacro.execute(PopularMacro.java:62) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:51) at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:203) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:169) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:67) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:120) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:105) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:46) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30) at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) at sun.reflect.GeneratedMethodAccessor464.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) ... {code}
    via by Adam Laskowski [Atlassian],
    • java.lang.NullPointerException at com.atlassian.user.search.page.PagerUtils.toList(PagerUtils.java:25) at com.atlassian.confluence.extra.userlister.model.UserList.getGroupUsers(UserList.java:91) at com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:39) at com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:79) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:340) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:241) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:130) at com.atlassian.renderer.v2.components.MacroRendererComponent.handlePotentialMacro(MacroRendererComponent.java:115) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:77) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:54) at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
    No Bugmate found.