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

プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

症状

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

診断

This issue can be reproduced each time a blog post is renamed, as per: CONFSERVER-16694 - After renaming a BlogPost, pageManager.getById() return a Page, not a BlogPost

原因

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

ソリューション

ソリューション

  • Enable Safe Mode via Confluence Admin >> Manage Add-Ons

  • Alternatively, you can look for the PageTypes plugin by Scandio and disable that

更新日時: September 26, 2025

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。