java.lang.NullPointerException

Atlassian JIRA | Kenny MacLeod | 2 years ago
  1. 0

    The {{PageIncludeMacro}} can fail with a NullPointerException. Here's an example stack trace: {noformat} 2014-07-30 22:10:19,521 ERROR [catalina-exec-32] [xhtml.view.macro.ViewMacroMarshaller] marshalInternal Error rendering macro: include -- url: /display/DOC/Exporting+Confluence+Pages+and+Spaces+to+PDF | page: 139527 | userName: anonymous | referer: https://www.google.com/ | action: viewpage java.lang.NullPointerException at com.atlassian.confluence.plugins.macros.advanced.DefaultPageProvider.resolve(DefaultPageProvider.java:48) at com.atlassian.confluence.plugins.macros.advanced.PageIncludeMacro.execute(PageIncludeMacro.java:97) at sun.reflect.GeneratedMethodAccessor830.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:225) at com.sun.proxy.$Proxy2247.execute(Unknown Source) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:113) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:68) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:30) at com.atlassian.confluence.content.render.xhtml.UnmarshalMarshalFragmentTransformer.transform(UnmarshalMarshalFragmentTransformer.java:31) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transformFragment(DefaultFragmentTransformer.java:153) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:129) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:44) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:41) at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:51) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:80) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:68) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:58) at com.atlassian.confluence.content.render.xhtml.DeviceTypeAwareRenderer.render(DeviceTypeAwareRenderer.java:42) at com.atlassian.confluence.pages.actions.ViewPageAction.getXHtmlComments(ViewPageAction.java:299) {noformat} The NPE comes about from a null {{link}} parameter. The code needs to account for that properly. Updated by [~ple] The log above is for rendering comments and the log below is for rendering page {noformat} 2014-07-31 00:49:26,521 ERROR [catalina-exec-32] [xhtml.view.macro.ViewMacroMarshaller] marshalInternal Error rendering macro: include -- url: /display/CONFKB/Does+Confluence+Support+DIGEST+MD5/ | page: 229180140 | userName: anonymous | action: viewpage java.lang.NullPointerException at com.atlassian.confluence.plugins.macros.advanced.DefaultPageProvider.resolve(DefaultPageProvider.java:48) at com.atlassian.confluence.plugins.macros.advanced.PageIncludeMacro.execute(PageIncludeMacro.java:97) at sun.reflect.GeneratedMethodAccessor830.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:225) at com.sun.proxy.$Proxy2247.execute(Unknown Source) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:113) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:68) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:30) at com.atlassian.confluence.content.render.xhtml.UnmarshalMarshalFragmentTransformer.transform(UnmarshalMarshalFragmentTransformer.java:31) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transformFragment(DefaultFragmentTransformer.java:153) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:129) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:44) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:41) at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:51) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:80) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:68) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:58) at com.atlassian.confluence.content.render.xhtml.DeviceTypeAwareRenderer.render(DeviceTypeAwareRenderer.java:42) at com.atlassian.confluence.pages.actions.ViewPageAction.execute(ViewPageAction.java:261) {noformat}

    Atlassian JIRA | 2 years ago | Kenny MacLeod
    java.lang.NullPointerException
  2. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.confluence.plugins.macros.advanced.DefaultPageProvider.resolve()
    2. com.atlassian.confluence
      PageIncludeMacro.execute
      1. com.atlassian.confluence.plugins.macros.advanced.DefaultPageProvider.resolve(DefaultPageProvider.java:48)
      2. com.atlassian.confluence.plugins.macros.advanced.PageIncludeMacro.execute(PageIncludeMacro.java:97)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor830.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    4. com.atlassian.confluence
      XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke
      1. com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:225)
      1 frame
    5. com.sun.proxy
      $Proxy2247.execute
      1. com.sun.proxy.$Proxy2247.execute(Unknown Source)
      1 frame
    6. com.atlassian.confluence
      ViewPageAction.getXHtmlComments
      1. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:113)
      2. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:68)
      3. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:30)
      4. com.atlassian.confluence.content.render.xhtml.UnmarshalMarshalFragmentTransformer.transform(UnmarshalMarshalFragmentTransformer.java:31)
      5. com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transformFragment(DefaultFragmentTransformer.java:153)
      6. com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:129)
      7. com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:44)
      8. com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:41)
      9. com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:51)
      10. com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:80)
      11. com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:68)
      12. com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:58)
      13. com.atlassian.confluence.content.render.xhtml.DeviceTypeAwareRenderer.render(DeviceTypeAwareRenderer.java:42)
      14. com.atlassian.confluence.pages.actions.ViewPageAction.getXHtmlComments(ViewPageAction.java:299)
      14 frames