ClassCastException from getAbstractPageById thrown by AttachmentNotFoundAction

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 4.2.5
    • Affects Version/s: 4.1
    • Component/s: None

      The AttachmentNotFoundAction, which reports that the data for an attachment is missing, assumes the attachment is attached to a page. However logos are stored as attachments to a GlobalDescription or SpaceDescription. In 4.1 it results in the following stacktrace:

      2012-01-11 16:15:59,853 ERROR [TP-Processor11] [ContainerBase.[Standalone].[localhost].[/]] log Unhandled exception occurred whilst decorating page
       -- url: /attachmentnotfound.action | userName: anonymous 
      java.lang.ClassCastException: com.atlassian.confluence.setup.settings.GlobalDescription cannot be cast to com.atlassian.confluence.pages.AbstractPage
      	at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:18)
      	at sun.reflect.GeneratedMethodAccessor489.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:307)
      	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 $Proxy38.getAbstractPageById(Unknown Source)
      	at com.atlassian.confluence.pages.DefaultPageManager.getAbstractPage(DefaultPageManager.java:113)
      	at sun.reflect.GeneratedMethodAccessor488.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:307)
      	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 com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy40.getAbstractPage(Unknown Source)
      	at com.atlassian.confluence.spaces.DefaultSpaceManager.getSpaceFromPageId(DefaultSpaceManager.java:531)
      

            Assignee:
            Unassigned
            Reporter:
            Don Willis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: