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.

  • 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}
    via by Kenny MacLeod,
    • 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)
    No Bugmate found.