org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25]

Atlassian JIRA | Zed Yap [Atlassian] | 8 years ago
  1. 0

    Steps to reproduce: # Create a page with a gallery macro: {noformat}{gallery}{noformat} # Do _not_ attach any images to the page # Export the page to PDF or HTML via *{{Space Admin->Advanced->Export Space}}*. _Please note that the problem does not exist if you export the page to PDF through the "{{Tools->Export to PDF}}"_ menu The HTML or PDF page will contain an error message: {quote} Error trying to draw image gallery org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25] {quote} In Confluence version prior to 2.9, a nice message is presented to the user instead: {quote} There are no images attached to this page {quote} The following stack trace recorded in the log during the export: {quote} 2009-02-04 18:25:15,531 ERROR [Export Space task] [plugins.macros.advanced.GalleryMacro] execute Error while trying to draw the image gallery -- url: /confluence/spaces/doexportspace.action | userName: admin | referer: http://localhost:8100/confluence/spaces/exportspace.action?key=~admin | action: doexportspace org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:58) at com.atlassian.confluence.plugins.macros.advanced.GalleryMacro.execute(GalleryMacro.java:100) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:196) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:154) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:58) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:43) 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.GeneratedMethodAccessor329.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:20) 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 $Proxy55.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.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:28) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:71) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:179) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:87) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:99) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:86) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:31) at com.atlassian.confluence.importexport.DefaultImportExportManager.exportAs(DefaultImportExportManager.java:112) 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) 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 $Proxy68.exportAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningTask$1.doInTransactionWithoutResult(ExportSpaceLongRunningTask.java:88) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningTask.runInternal(ExportSpaceLongRunningTask.java:59) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at com.atlassian.plugin.webresource.WebResourceManagerImpl.getIncludeMode(WebResourceManagerImpl.java:261) at com.atlassian.plugin.webresource.WebResourceManagerImpl.requireResource(WebResourceManagerImpl.java:58) at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.requireResource(DefaultConfluenceWebResourceManager.java:49) at sun.reflect.GeneratedMethodAccessor233.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 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 $Proxy48.requireResource(Unknown Source) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) 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.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) ... 72 more {quote}

    Atlassian JIRA | 8 years ago | Zed Yap [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25]
  2. 0

    Steps to reproduce: # Create a page with a gallery macro: {noformat}{gallery}{noformat} # Do _not_ attach any images to the page # Export the page to PDF or HTML via *{{Space Admin->Advanced->Export Space}}*. _Please note that the problem does not exist if you export the page to PDF through the "{{Tools->Export to PDF}}"_ menu The HTML or PDF page will contain an error message: {quote} Error trying to draw image gallery org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25] {quote} In Confluence version prior to 2.9, a nice message is presented to the user instead: {quote} There are no images attached to this page {quote} The following stack trace recorded in the log during the export: {quote} 2009-02-04 18:25:15,531 ERROR [Export Space task] [plugins.macros.advanced.GalleryMacro] execute Error while trying to draw the image gallery -- url: /confluence/spaces/doexportspace.action | userName: admin | referer: http://localhost:8100/confluence/spaces/exportspace.action?key=~admin | action: doexportspace org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:58) at com.atlassian.confluence.plugins.macros.advanced.GalleryMacro.execute(GalleryMacro.java:100) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:196) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:154) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:58) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:43) 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.GeneratedMethodAccessor329.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:20) 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 $Proxy55.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.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:28) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:71) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:179) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:87) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:99) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:86) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:31) at com.atlassian.confluence.importexport.DefaultImportExportManager.exportAs(DefaultImportExportManager.java:112) 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) 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 $Proxy68.exportAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningTask$1.doInTransactionWithoutResult(ExportSpaceLongRunningTask.java:88) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningTask.runInternal(ExportSpaceLongRunningTask.java:59) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at com.atlassian.plugin.webresource.WebResourceManagerImpl.getIncludeMode(WebResourceManagerImpl.java:261) at com.atlassian.plugin.webresource.WebResourceManagerImpl.requireResource(WebResourceManagerImpl.java:58) at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.requireResource(DefaultConfluenceWebResourceManager.java:49) at sun.reflect.GeneratedMethodAccessor233.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 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 $Proxy48.requireResource(Unknown Source) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) 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.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) ... 72 more {quote}

    Atlassian JIRA | 8 years ago | Zed Yap [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy48 threw exception java.lang.NullPointerException @ /com/atlassian/confluence/plugins/macros/advanced/gallery-default.vm[1,25]
  3. 0

    When exporting a page that contains a simple macro to Word, the following error exceptions shown: {noformat} 2008-08-14 16:21:01,359 ERROR [http-8029-Processor6] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /foo/bar/foo.vm -- url: /exportword | userName: admin org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy40 threw exception java.lang.NullPointerException @ /foo/bar/foo.vm[1,21] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:56) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:34) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:27) at foo.bar.ExampleMacro.execute(ExampleMacro.java:66) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:297) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:255) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:151) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:47) 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.GeneratedMethodAccessor274.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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:20) 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 $Proxy47.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.servlet.ExportWordPageServer.service(ExportWordPageServer.java:138) at com.atlassian.confluence.servlet.SpringManagedServlet.service(SpringManagedServlet.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at com.atlassian.plugin.webresource.WebResourceManagerImpl.getIncludeMode(WebResourceManagerImpl.java:239) at com.atlassian.plugin.webresource.WebResourceManagerImpl.requireResource(WebResourceManagerImpl.java:53) at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.requireResource(DefaultConfluenceWebResourceManager.java:47) at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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 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 $Proxy40.requireResource(Unknown Source) at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) ... 83 more {noformat} The problem can be reproduced with a macro which does nothing other than rendering a Velocity template which looks like this: {noformat:title=foo.vm} #requireResource("confluence.web.resources:prototype") Resource required! {noformat} This problem also exists to the Dynamic Task List macro. *I've attached the sample plugin to this issue, both binary and source, just in case you'd like to try it out.*

    Atlassian JIRA | 8 years ago | Ming Giet Chong [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy40 threw exception java.lang.NullPointerException @ /foo/bar/foo.vm[1,21]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When exporting a page that contains a simple macro to Word, the following error exceptions shown: {noformat} 2008-08-14 16:21:01,359 ERROR [http-8029-Processor6] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /foo/bar/foo.vm -- url: /exportword | userName: admin org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy40 threw exception java.lang.NullPointerException @ /foo/bar/foo.vm[1,21] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:56) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:34) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:27) at foo.bar.ExampleMacro.execute(ExampleMacro.java:66) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:297) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:255) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:151) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:47) 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.GeneratedMethodAccessor274.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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:20) 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 $Proxy47.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.servlet.ExportWordPageServer.service(ExportWordPageServer.java:138) at com.atlassian.confluence.servlet.SpringManagedServlet.service(SpringManagedServlet.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at com.atlassian.plugin.webresource.WebResourceManagerImpl.getIncludeMode(WebResourceManagerImpl.java:239) at com.atlassian.plugin.webresource.WebResourceManagerImpl.requireResource(WebResourceManagerImpl.java:53) at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.requireResource(DefaultConfluenceWebResourceManager.java:47) at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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 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 $Proxy40.requireResource(Unknown Source) at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) ... 83 more {noformat} The problem can be reproduced with a macro which does nothing other than rendering a Velocity template which looks like this: {noformat:title=foo.vm} #requireResource("confluence.web.resources:prototype") Resource required! {noformat} This problem also exists to the Dynamic Task List macro. *I've attached the sample plugin to this issue, both binary and source, just in case you'd like to try it out.*

    Atlassian JIRA | 8 years ago | Ming Giet Chong [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy40 threw exception java.lang.NullPointerException @ /foo/bar/foo.vm[1,21]
  6. 0

    When exporting a page that contains a simple macro to Word, the following error will be shown: {noformat} 2008-08-14 16:21:01,359 ERROR [http-8029-Processor6] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /foo/bar/foo.vm -- url: /exportword | userName: admin org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy40 threw exception java.lang.NullPointerException @ /foo/bar/foo.vm[1,21] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.Template.merge(Template.java:254) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:56) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:34) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:27) at foo.bar.ExampleMacro.execute(ExampleMacro.java:66) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:297) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:255) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:151) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:47) 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.GeneratedMethodAccessor274.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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:20) 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 $Proxy47.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.servlet.ExportWordPageServer.service(ExportWordPageServer.java:138) at com.atlassian.confluence.servlet.SpringManagedServlet.service(SpringManagedServlet.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at com.atlassian.plugin.webresource.WebResourceManagerImpl.getIncludeMode(WebResourceManagerImpl.java:239) at com.atlassian.plugin.webresource.WebResourceManagerImpl.requireResource(WebResourceManagerImpl.java:53) at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.requireResource(DefaultConfluenceWebResourceManager.java:47) at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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 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 $Proxy40.requireResource(Unknown Source) at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) ... 83 more {noformat} The problem can be reproduced with a macro which does nothing other than rendering a Velocity template which looks like this: {noformat:title=foo.vm} #requireResource("confluence.web.resources:prototype") Resource required! {noformat} *I've attached that plugin to this issue, both binary and source, just in case you'd like to try it out.*

    Atlassian JIRA | 8 years ago | Ming Giet Chong [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'requireResource' in class $Proxy40 threw exception java.lang.NullPointerException @ /foo/bar/foo.vm[1,21]

    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.plugin.webresource.WebResourceManagerImpl.getIncludeMode()
    2. com.atlassian.plugin
      WebResourceManagerImpl.requireResource
      1. com.atlassian.plugin.webresource.WebResourceManagerImpl.getIncludeMode(WebResourceManagerImpl.java:261)
      2. com.atlassian.plugin.webresource.WebResourceManagerImpl.requireResource(WebResourceManagerImpl.java:58)
      2 frames
    3. com.atlassian.confluence
      DefaultConfluenceWebResourceManager.requireResource
      1. com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.requireResource(DefaultConfluenceWebResourceManager.java:49)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    5. 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
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    7. 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
    8. Unknown
      $Proxy48.requireResource
      1. $Proxy48.requireResource(Unknown Source)
      1 frame
    9. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    10. Apache Velocity
      UberspectImpl$VelMethodImpl.invoke
      1. org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
      1 frame
    11. com.atlassian.confluence
      UnboxingMethod.invoke
      1. com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29)
      1 frame
    12. Apache Velocity
      Template.merge
      1. org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
      2. org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
      3. org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
      4. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      5. org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
      6. org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
      7. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      8. org.apache.velocity.Template.merge(Template.java:254)
      8 frames
    13. com.atlassian.confluence
      GalleryMacro.execute
      1. com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:58)
      2. com.atlassian.confluence.plugins.macros.advanced.GalleryMacro.execute(GalleryMacro.java:100)
      2 frames
    14. com.atlassian.renderer
      V2RendererFacade.convertWikiToXHtml
      1. com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45)
      2. com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:196)
      3. com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:154)
      4. com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:58)
      5. com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18)
      6. com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126)
      7. com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114)
      8. com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99)
      9. com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60)
      10. com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:43)
      11. com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53)
      12. com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30)
      13. com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
      13 frames
    15. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor329.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    16. 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
    17. com.atlassian.spring
      SpringProfilingInterceptor.invoke
      1. com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
      1 frame
    18. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      1 frame
    19. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    20. 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
    21. Unknown
      $Proxy55.convertWikiToXHtml
      1. $Proxy55.convertWikiToXHtml(Unknown Source)
      1 frame
    22. 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
    23. 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
    24. Apache Velocity
      UberspectImpl$VelMethodImpl.invoke
      1. org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
      1 frame
    25. 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:29)
      2 frames
    26. Apache Velocity
      Template.merge
      1. org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
      2. org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
      3. org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
      4. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      5. org.apache.velocity.Template.merge(Template.java:254)
      5 frames
    27. com.atlassian.confluence
      DefaultImportExportManager.exportAs
      1. com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:71)
      2. com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:179)
      3. com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:87)
      4. com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:99)
      5. com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:86)
      6. com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:31)
      7. com.atlassian.confluence.importexport.DefaultImportExportManager.exportAs(DefaultImportExportManager.java:112)
      7 frames
    28. 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
    29. 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
    30. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    31. 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
    32. Unknown
      $Proxy68.exportAs
      1. $Proxy68.exportAs(Unknown Source)
      1 frame
    33. com.atlassian.confluence
      ExportSpaceLongRunningTask$1.doInTransactionWithoutResult
      1. com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningTask$1.doInTransactionWithoutResult(ExportSpaceLongRunningTask.java:88)
      1 frame
    34. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
      2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
      2 frames
    35. com.atlassian.confluence
      ConfluenceAbstractLongRunningTask.run
      1. com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningTask.runInternal(ExportSpaceLongRunningTask.java:59)
      2. com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21)
      2 frames
    36. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame