Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-8123

Using attachments syntax on space template results in NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.5.5
    • Component/s: None
    • Environment:

      Debian etch, JDK 1.5.0_10

      Description

      On a space template i have a pretty simple template which works fine. When i edit the template and use

      {attachments:old=true}

      , after saving i get:
      Error formatting macro: attachments: java.lang.NullPointerException
      on the template, which looks kinda scary. When i use the template all works as expected. Looks like bad error handling to me.

      log file extract:
      2007-03-22 17:33:19,617 ERROR [http-127.0.0.1-14281-9] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: attachments
      java.lang.NullPointerException
      at com.atlassian.confluence.extra.attachments.AttachmentsMacro.execute(AttachmentsMacro.java:76)
      at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45)
      at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:336)
      at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:237)
      at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:130)
      at com.atlassian.renderer.v2.components.MacroRendererComponent.handlePotentialMacro(MacroRendererComponent.java:115)
      at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:77)
      at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:54)
      at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
      at sun.reflect.GeneratedMethodAccessor126.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:284)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
      at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
      at $Proxy32.convertWikiToXHtml(Unknown Source)
      at com.atlassian.confluence.renderer.DefaultWikiStyleRenderer.convertWikiToXHtml(DefaultWikiStyleRenderer.java:23)
      at com.atlassian.confluence.pages.templates.actions.ViewPageTemplateAction.getPageXHtmlContent(ViewPageTemplateAction.java:39)
      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:585)
      at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:491)
      at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:904)
      at ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
      at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
      at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
      at com.opensymphony.xwork.util.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:97)
      at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
      at ognl.ASTProperty.getValueBody(ASTProperty.java:96)
      at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
      at ognl.SimpleNode.getValue(SimpleNode.java:193)
      at ognl.Ognl.getValue(Ognl.java:333)
      at ognl.Ognl.getValue(Ognl.java:310)
      at com.opensymphony.xwork.util.OgnlValueStack.findValue(OgnlValueStack.java:141)
      at com.opensymphony.webwork.views.velocity.WebWorkVelocityContext.internalGet(WebWorkVelocityContext.java:72)
      at org.apache.velocity.context.AbstractContext.get(AbstractContext.java:238)
      at org.apache.velocity.context.InternalContextAdapterImpl.get(InternalContextAdapterImpl.java:200)
      at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:705)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:183)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:250)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
      at org.apache.velocity.runtime.directive.Parse.render(Parse.java:232)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:159)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:159)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
      at org.apache.velocity.Template.merge(Template.java:296)
      at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91)
      at com.atlassian.xwork.results.ProfiledVelocityResult.doExecute(ProfiledVelocityResult.java:21)
      at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116)
      at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55)
      at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:39)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.atlassian.confluence.core.ConfluenceValidationInterceptor.intercept(ConfluenceValidationInterceptor.java:16)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:114)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:67)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.core.actions.LastModifiedInterceptor.intercept(LastModifiedInterceptor.java:39)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:25)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:98)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115)
      at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:229)
      at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:270)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:117)
      at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:137)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:51)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:159)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:172)
      at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:122)
      at com.atlassian.core.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:27)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.core.filters.gzip.GzipFilter.doFilter(GzipFilter.java:61)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:227)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:211)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:623)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:444)
      at java.lang.Thread.run(Thread.java:595)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cmiller@atlassian.com Charles Miller
              Reporter:
              08eefb3790b1 Lothar Hegebart
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: