java.lang.NullPointerException

Atlassian JIRA | Tuomas Jormola | 10 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    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.

    Atlassian JIRA | 10 years ago | Tuomas Jormola
    java.lang.NullPointerException
  2. 0

    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.

    Atlassian JIRA | 10 years ago | Tuomas Jormola
    java.lang.NullPointerException
  3. 0

    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}

    Atlassian JIRA | 6 years ago | Adam Laskowski [Atlassian]
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.user.search.page.PagerUtils.toList()
    2. com.atlassian.user
      PagerUtils.toList
      1. com.atlassian.user.search.page.PagerUtils.toList(PagerUtils.java:25)
      1 frame
    3. com.atlassian.confluence
      UserLister.execute
      1. com.atlassian.confluence.extra.userlister.model.UserList.getGroupUsers(UserList.java:91)
      2. com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:39)
      3. com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:79)
      3 frames
    4. com.atlassian.renderer
      V2RendererFacade.convertWikiToXHtml
      1. com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45)
      2. com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:340)
      3. com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:241)
      4. com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:130)
      5. com.atlassian.renderer.v2.components.MacroRendererComponent.handlePotentialMacro(MacroRendererComponent.java:115)
      6. com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:77)
      7. com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:54)
      8. com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
      8 frames