Getting 'java.lang.RuntimeException: Error rendering template for decorator root' error after switching the default Confluence theme

お困りですか?

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

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

    

要約

After switching the Confluence theme, all Confluence pages are not accessible anymore, and display an error instead.

診断

When loading any Confluence page, an error similar to the following is displayed:

Cause
 java.lang.RuntimeException: Error rendering template for decorator root
 at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:161)

caused by: java.lang.RuntimeException: Error rendering template for decorator page
 at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:161)

caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/labels/labels-include.vm'
 at com.atlassian.confluence.util.velocity.ConfigurableResourceManager.loadResource(ConfigurableResourceManager.java:376)

Stack Trace:[hide]
 java.lang.RuntimeException: Error rendering template for decorator root

Looking at the Confluence logs, at the moment the new theme was set, there may also be an error similar to this:

2020-03-12 16:06:09,749 ERROR [https-jsse-nio-443-exec-245] [[Standalone].[localhost].[/].[file-server]] log Servlet.service() for servlet [file-server] threw exception
 -- referer: https://<base-url>/plugins/servlet/notifications-miniview | url: /s/a7s1ms/8301/1f37aa72eaac19bd0bed2ae0e7b3ada09c563331/2.0-rc1/_/download/resources/com.atlassian.confluence.themes.classic:classic/classic-theme.css | traceId: 158826b0aa74895b | userName: user
java.lang.RuntimeException: Cannot read resource /styles/classic-theme.css

原因

The theme that was activated is not present on the Confluence files, and the style files it's trying to load do not exist. This will cause Confluence to be unable to load any pages, as it's not able to find the necessary style files for the currently used theme.

ソリューション

Revert back to the Confluence default theme by doing the following:

  1. Access Confluence's General Configuration page directly:

    <your-Confluence-URL>/admin/viewgeneralconfig.action
  2. Change the Confluence theme once more, back to the default theme

It's possible the theme is not working due to being an outdated Confluence theme from an earlier version, in which case it's possible to disable the plugin that provides it, in order to stop this problematic theme from being used:

  1. Go to Confluence Administration > Manage Apps
  2. Filter for All apps
  3. Look for the plugin with the same name as that particular theme, and check if you can find it on the plugin list (doing a text search on the page could help)
  4. If you're able to find it, Disable it

最終更新日 2020 年 6 月 15 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.