"java.lang.ClassCastException: com.atlassian.confluence.pages.Page cannot be cast to com.atlassian.confluence.pages.BlogPost" Error While Rendering Blog Post Macro

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Blog post Macro Fails to render, and the following appears in the atlassian-confluence.log:

Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getPostingYear' in  class com.atlassian.confluence.pages.BlogPost$$EnhancerByCGLIB$$118c9662 threw exception java.lang.ClassCastException: com.atlassian.confluence.pages.Page cannot be cast to com.atlassian.confluence.pages.BlogPost at template/includes/macros.vm[line 721, column 72]
	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
	at 

Diagnosis

This issue can be reproduced each time a blog post is renamed, as per: CONF-16694 - Getting issue details... STATUS

Cause

Third party plugins, such as the PageTypes plugin by Scandio (de.scandio.confluence.plugins.pagetypes)

Resolution

  • Enable Safe Mode via Confluence Admin >> Manage Add-Ons
  • Alternatively, you can look for the PageTypes plugin by Scandio and disable that
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.