java.lang.NullPointerException

JIRA | Carsten Pfeiffer | 5 years ago
  1. 0

    When doing an HTML export of a page using the cache macro, I get a NullPointerException: {code} java.lang.NullPointerException at uk.ltd.getahead.dwr.WebContextFactory$ProxyWebContext.getHttpServletRequest(WebContextFactory.java:102) at org.randombits.confluence.support.DWRServletInfo.getRequest(DWRServletInfo.java:30) at org.randombits.confluence.support.ServletAssistant$2.fetch(ServletAssistant.java:48) at org.randombits.confluence.support.ServletAssistant.fetch(ServletAssistant.java:70) at org.randombits.confluence.support.ServletAssistant.getRequest(ServletAssistant.java:46) at org.randombits.confluence.support.PageInfo.getRequest(PageInfo.java:172) at org.randombits.confluence.support.PageInfo.getRequestAttributes(PageInfo.java:126) at org.swift.confluence.cache.CacheMacro.getUniqueId(CacheMacro.java:410) at org.swift.confluence.cache.CacheMacro.execute(CacheMacro.java:106) at org.randombits.confluence.support.ConfluenceMacro.execute(ConfluenceMacro.java:54) 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:100) 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.GeneratedMethodAccessor508.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy58.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.importexport.impl.WikiExporter.exportWikiToXHtml(WikiExporter.java:124) at com.atlassian.confluence.importexport.impl.WikiExporter.exportWikiToXHtml(WikiExporter.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at com.atlassian.confluence.velocity.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:28) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:31) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) at org.apache.velocity.Template.merge(Template.java:235) at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:62) at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68) at com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:77) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:186) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:88) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:100) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:91) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:32) at com.atlassian.confluence.importexport.DefaultImportExportManager.exportAs(DefaultImportExportManager.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) ... {code} I "fixed" this locally with a try-catch in CacheMacro.getUniqueId().

    JIRA | 5 years ago | Carsten Pfeiffer
    java.lang.NullPointerException
  2. 0

    When doing an HTML export of a page using the cache macro, I get a NullPointerException: {code} java.lang.NullPointerException at uk.ltd.getahead.dwr.WebContextFactory$ProxyWebContext.getHttpServletRequest(WebContextFactory.java:102) at org.randombits.confluence.support.DWRServletInfo.getRequest(DWRServletInfo.java:30) at org.randombits.confluence.support.ServletAssistant$2.fetch(ServletAssistant.java:48) at org.randombits.confluence.support.ServletAssistant.fetch(ServletAssistant.java:70) at org.randombits.confluence.support.ServletAssistant.getRequest(ServletAssistant.java:46) at org.randombits.confluence.support.PageInfo.getRequest(PageInfo.java:172) at org.randombits.confluence.support.PageInfo.getRequestAttributes(PageInfo.java:126) at org.swift.confluence.cache.CacheMacro.getUniqueId(CacheMacro.java:410) at org.swift.confluence.cache.CacheMacro.execute(CacheMacro.java:106) at org.randombits.confluence.support.ConfluenceMacro.execute(ConfluenceMacro.java:54) 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:100) 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.GeneratedMethodAccessor508.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy58.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.importexport.impl.WikiExporter.exportWikiToXHtml(WikiExporter.java:124) at com.atlassian.confluence.importexport.impl.WikiExporter.exportWikiToXHtml(WikiExporter.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at com.atlassian.confluence.velocity.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:28) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:31) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) at org.apache.velocity.Template.merge(Template.java:235) at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:62) at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68) at com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:77) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:186) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:88) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:100) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:91) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:32) at com.atlassian.confluence.importexport.DefaultImportExportManager.exportAs(DefaultImportExportManager.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) ... {code} I "fixed" this locally with a try-catch in CacheMacro.getUniqueId().

    JIRA | 5 years ago | Carsten Pfeiffer
    java.lang.NullPointerException
  3. 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
  4. 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 uk.ltd.getahead.dwr.WebContextFactory$ProxyWebContext.getHttpServletRequest()
    2. Direct Web Remoting
      WebContextFactory$ProxyWebContext.getHttpServletRequest
      1. uk.ltd.getahead.dwr.WebContextFactory$ProxyWebContext.getHttpServletRequest(WebContextFactory.java:102)
      1 frame
    3. org.randombits.confluence
      PageInfo.getRequestAttributes
      1. org.randombits.confluence.support.DWRServletInfo.getRequest(DWRServletInfo.java:30)
      2. org.randombits.confluence.support.ServletAssistant$2.fetch(ServletAssistant.java:48)
      3. org.randombits.confluence.support.ServletAssistant.fetch(ServletAssistant.java:70)
      4. org.randombits.confluence.support.ServletAssistant.getRequest(ServletAssistant.java:46)
      5. org.randombits.confluence.support.PageInfo.getRequest(PageInfo.java:172)
      6. org.randombits.confluence.support.PageInfo.getRequestAttributes(PageInfo.java:126)
      6 frames
    4. org.swift.confluence
      CacheMacro.execute
      1. org.swift.confluence.cache.CacheMacro.getUniqueId(CacheMacro.java:410)
      2. org.swift.confluence.cache.CacheMacro.execute(CacheMacro.java:106)
      2 frames
    5. org.randombits.confluence
      ConfluenceMacro.execute
      1. org.randombits.confluence.support.ConfluenceMacro.execute(ConfluenceMacro.java:54)
      1 frame
    6. com.atlassian.renderer
      V2RendererFacade.convertWikiToXHtml
      1. com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:51)
      2. com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:203)
      3. com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:169)
      4. com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:67)
      5. com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18)
      6. com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:120)
      7. com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:100)
      8. com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60)
      9. com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:46)
      10. com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53)
      11. com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30)
      12. com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
      12 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    8. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    9. com.atlassian.spring
      SpringProfilingInterceptor.invoke
      1. com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      1 frame
    10. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      1 frame
    11. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    12. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    13. Unknown
      $Proxy58.convertWikiToXHtml
      1. $Proxy58.convertWikiToXHtml(Unknown Source)
      1 frame
    14. com.atlassian.confluence
      WikiExporter.exportWikiToXHtml
      1. com.atlassian.confluence.importexport.impl.WikiExporter.exportWikiToXHtml(WikiExporter.java:124)
      2. com.atlassian.confluence.importexport.impl.WikiExporter.exportWikiToXHtml(WikiExporter.java:82)
      2 frames
    15. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    16. Apache Velocity
      UberspectImpl$VelMethodImpl.invoke
      1. org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
      2. org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
      2 frames
    17. com.atlassian.confluence
      UnboxingMethod.invoke
      1. com.atlassian.confluence.velocity.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:28)
      2. com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:31)
      2 frames
    18. Apache Velocity
      Template.merge
      1. org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
      2. org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
      3. org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
      4. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      5. org.apache.velocity.Template.merge(Template.java:328)
      6. org.apache.velocity.Template.merge(Template.java:235)
      6 frames
    19. com.atlassian.confluence
      DefaultImportExportManager.exportAs
      1. com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:62)
      2. com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68)
      3. com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:77)
      4. com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:186)
      5. com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:88)
      6. com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:100)
      7. com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:91)
      8. com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:32)
      9. com.atlassian.confluence.importexport.DefaultImportExportManager.exportAs(DefaultImportExportManager.java:106)
      9 frames
    20. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    21. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames