-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
3.0.2, 3.1
When Creating a Page using a Template consists of attachment macro and Form field markup will give the following exception:
Cause
java.lang.ClassCastException: com.atlassian.confluence.pages.Draft cannot be cast to com.atlassian.confluence.pages.AbstractPage
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:17)
Stack Trace:[hide]
java.lang.ClassCastException: com.atlassian.confluence.pages.Draft cannot be cast to com.atlassian.confluence.pages.AbstractPage
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:17)
at sun.reflect.GeneratedMethodAccessor551.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 $Proxy33.getAbstractPageById(Unknown Source)
at com.atlassian.confluence.pages.DefaultPageManager.getAbstractPage(DefaultPageManager.java:115)
at sun.reflect.GeneratedMethodAccessor550.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 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 $Proxy34.getAbstractPage(Unknown Source)
at com.atlassian.confluence.pages.actions.PageAwareInterceptor.getPageFromId(PageAwareInterceptor.java:144)
at com.atlassian.confluence.pages.actions.PageAwareInterceptor.getPage(PageAwareInterceptor.java:133)
Steps to replicate
- First create page template in space
- Save it and then go to the home page of the particular space
- Click Add --> Page
- Click Select a page template to start from
- Select the template and click Next
- Fill in the variable with some text and press Insert Variables.
- Now you should see the exception on your screen.
- duplicates
-
CONFSERVER-18422 Cannot create a page from a template which contains the attachment macro and template variables
-
- Closed
-
- relates to
-
CONFSERVER-10287 Creating a template using {metadata-list} macro leads to an error page
-
- Closed
-
-
CONFSERVER-11935 Create Space Error (Page Not Found) when using {toc} macro in space template
-
- Closed
-