• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 1.4.2
    • 1.4.1
    • None
    • Standalone, JDK "1.5.0_03", Redhat EL 3, Mysql

      Sometimes the attachments tab shows a macro text:

      Attachments ($helper.action.attachments.size())

      Rather than:

      Attachments (0)

      Attached is a screen shot.

      So far, we have seen this only for profile pages, for quite a few users, and it is consistent - we don't know what makes it go away.

      As an experiment, on one offending profile page we attempted to attach something - this threw an exception (I didn't log this separately as I assume this is related):


      java.lang.NullPointerException
      at com.atlassian.confluence.pages.DefaultAttachmentManager.getLatestVersionsOfAttachments(DefaultAttachmentManager.java:69)
      at com.atlassian.confluence.pages.AbstractAttachmentManager.getAttachment(AbstractAttachmentManager.java:50)
      at com.atlassian.confluence.pages.AbstractAttachmentManager.getAttachment(AbstractAttachmentManager.java:32)
      at com.atlassian.confluence.pages.DelegatorAttachmentManager.getAttachment(DelegatorAttachmentManager.java:55)
      at sun.reflect.GeneratedMethodAccessor2820.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)
      at $Proxy6.getAttachment(Unknown Source)
      at com.atlassian.confluence.pages.DefaultFileUploadManager.storeFile(DefaultFileUploadManager.java:51)
      at com.atlassian.confluence.user.actions.HandleProfileAttachmentsAction.execute(HandleProfileAttachmentsAction.java:65)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
      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:33)
      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:40)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:84)
      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.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.confluence.util.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:133)
      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:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:150)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)
      at bucket.custom.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:31)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
      at com.atlassian.confluence.util.error.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:27)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.atlassian.core.filters.gzip.GzipFilter.doFilter(GzipFilter.java:61)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:595)

      Referer URL: http://confluence.is3.c4isr.adi-limited.com:8080/users/handleuserprofileattachments.action?username=cooks

      Build Information:
      Uptime: 9 days, 11 hours, 38 minutes, 2 seconds
      Version: 1.4.1
      Build Number: 212

      Server Information:
      Application Server: Apache Tomcat/4.1.30
      Servlet Version: 2.3
      Database Dialect: bucket.dialect.MySQLDialect

      Memory Information:
      Total Memory: 231 MB
      Free Memory: 51 MB
      Used Memory: 180 MB

      System Information:
      System Date: Friday, 17 Jun 2005
      System Time: 08:25:30
      System Favourite Colour: Lime
      Java Version: 1.5.0_03
      Java Vendor: Sun Microsystems Inc.
      JVM Version: 1.0
      JVM Vendor: Sun Microsystems Inc.
      JVM Implementation Version: 1.5.0_03-b07
      Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition
      Java VM: Java HotSpot(TM) Client VM
      User Name: confadmin
      User Timezone: Australia/Perth
      Operating System: Linux 2.4.21-4.EL
      OS Architecture: i386

      Request

      Information:
      URL: http://confluence.is3.c4isr.adi-limited.com:8080/users/doprofileattachfile.action

      • Scheme: http
      • Server: confluence.is3.c4isr.adi-limited.com
      • Port: 8080
      • URI: /500page.jsp
      • - Context Path:
      • - Servlet Path: /500page.jsp
      • - Path Info: null
      • - Query String: profileId=$personalInformationEntity.id

      Attributes:

      • javax.servlet.error.message :
      • javax.servlet.error.exception : java.lang.NullPointerException
      • os_securityfilter_already_filtered : true
      • _sitemesh_using_stream : false
      • com.atlassian.johnson.filters.JohnsonFilter_already_filtered : true
      • javax.servlet.error.request_uri : /users/doprofileattachfile.action
      • javax.servlet.error.status_code : 500
      • _sitemesh_filterapplied : true
      • javax.servlet.error.servlet_name : action
      • webwork.valueStack : com.opensymphony.xwork.util.OgnlValueStack@34ed5d
      • atlassian.core.seraph.original.url : /users/doprofileattachfile.action?profileId=$personalInformationEntity.id
      • loginfilter.already.filtered : true
      • javax.servlet.jsp.jspException : java.lang.NullPointerException
      • sessioninview.FILTERED : true
      • com.atlassian.core.filters.gzip.GzipFilter_already_filtered : true

      Parameters:

      • profileId = $personalInformationEntity.id

      Logging:
      0 log statements generated by this request.

        1. AbstractUserProfileAction.class
          7 kB
          Charles Miller
        2. AttachmentsTab.png
          92 kB
          Deleted Account

            [CONFSERVER-3420] Attachments tab sometimes shows a macro instead of (0)

            Patched class file for Confluence 1.4.1

            Charles Miller (Inactive) added a comment - Patched class file for Confluence 1.4.1

            This is fixed for 1.4.2

            A patch is attached to this issue: just install the AbstractUserProfileAction.class over the existing file in WEB-INF/classes/com/atlassian/confluence/user/actions/

            Charles Miller (Inactive) added a comment - This is fixed for 1.4.2 A patch is attached to this issue: just install the AbstractUserProfileAction.class over the existing file in WEB-INF/classes/com/atlassian/confluence/user/actions/

            Hi Charles,

            Without being able to confirm it, I do believe those that have working
            attachments tabs have edited their profile.

            If the user edits, then updates (without adding text), the problem goes
            away.

            Cheers, R.

            _______________________________________________________
            Robert Whitney
            System Architect

            Electronics & Aerospace (IS3)
            ADI-Limited
            20-22 Stirling Hwy
            Nedlands Western Australia 6009
            Ph: +61 8 9333 8865
            Fax: +61 8 9333 8889
            Mob: +61 (0) 414 73 53 73
            email: rob.whitney@adi-limited.com
            www.adi-limited.com

            eContext.invokeNext(StandardPipeline.java:643)
            eContext.invokeNext(StandardPipeline.java:643)
            eContext.invokeNext(StandardPipeline.java:643)
            eContext.invokeNext(StandardPipeline.java:641)
            eContext.invokeNext(StandardPipeline.java:641)
            eContext.invokeNext(StandardPipeline.java:643)
            r.processConnection(Http11Protocol.java:700)

            DISCLAIMER:-----------------------------------------------------------------------------------------------
            This Email may contain confidential and/or privileged information and is intended
            solely for the addressee(s) named. If you have received this information in error, or
            are advised that you have been posted this Email by accident, please notify the
            sender by return Email, do not redistribute it, delete the Email and keep no copies.
            ----------------------------------------------------------------------------------------------------------------------

            Whitney, Robert added a comment - Hi Charles, Without being able to confirm it, I do believe those that have working attachments tabs have edited their profile. If the user edits, then updates (without adding text), the problem goes away. Cheers, R. _______________________________________________________ Robert Whitney System Architect Electronics & Aerospace (IS3) ADI-Limited 20-22 Stirling Hwy Nedlands Western Australia 6009 Ph: +61 8 9333 8865 Fax: +61 8 9333 8889 Mob: +61 (0) 414 73 53 73 email: rob.whitney@adi-limited.com www.adi-limited.com eContext.invokeNext(StandardPipeline.java:643) eContext.invokeNext(StandardPipeline.java:643) eContext.invokeNext(StandardPipeline.java:643) eContext.invokeNext(StandardPipeline.java:641) eContext.invokeNext(StandardPipeline.java:641) eContext.invokeNext(StandardPipeline.java:643) r.processConnection(Http11Protocol.java:700) DISCLAIMER:----------------------------------------------------------------------------------------------- This Email may contain confidential and/or privileged information and is intended solely for the addressee(s) named. If you have received this information in error, or are advised that you have been posted this Email by accident, please notify the sender by return Email, do not redistribute it, delete the Email and keep no copies. ----------------------------------------------------------------------------------------------------------------------

            Robert,

            Would I be correct in guessing that all the users who have attachments working have set a profile for themselves, and all those who don't have a blank profile? If a user edits their profile, does the problem go away? The attachments aren't actually added to the user, but to the user's profile (a PersonalInformation object), and it seems that somehow these aren't being created for users as they should.

            I'll look into it.

            Charles

            Charles Miller (Inactive) added a comment - Robert, Would I be correct in guessing that all the users who have attachments working have set a profile for themselves, and all those who don't have a blank profile? If a user edits their profile, does the problem go away? The attachments aren't actually added to the user, but to the user's profile (a PersonalInformation object), and it seems that somehow these aren't being created for users as they should. I'll look into it. Charles

            subsequently, a photo to the same user metioned above was added, which worked without an exception. The tab now correctly shows:

            Attachments (1)

            Deleted Account (Inactive) added a comment - subsequently, a photo to the same user metioned above was added, which worked without an exception. The tab now correctly shows: Attachments (1)

              Unassigned Unassigned
              ffd47060-24e5-4e76-8ba2-cdac367441c8 Deleted Account (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: