Confluence page fails to render with 'java.lang.RuntimeException: Error rendering template for decorator root' due to null label
問題
When attempting to view a page in Confluence it shows a System Error has occurred with a long stack trace.
The following appears in the atlassian-confluence.log
2016-07-13 05:35:09,638 ERROR [http-nio-8090-exec-7] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/pages/viewpage.vm'
-- referer: https://confluence.mycompany.com/spaces/viewspacesummary.action?key=SKEY | url: /display/SKEY/Home | userName: admin | action: viewpage | page: 8945682
java.lang.RuntimeException: Error rendering template for decorator root
...
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45]
...
Caused by: net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:71)
...
原因
The page has the Popular Label macro in use, but one of the labels has a null value in the label name.
回避策
Confirm this is the problem:
select * from LABEL where NAME is null;
If you want to find details about the content that is using the label:
select CONTENTID from CONTENT_LABEL where LABELID = '<labelid-from-above>'; select * from CONTENT where CONTENTID = '<contentid-from-above>';
If there are any results, use the following to update the data where
<some-name>
is the name of the label:update LABEL set NAME = '<some-name>' where LABELID = <labelid-from-above>;
- Restart Confluence and go to the page that was causing the issue
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
最終更新日 2016 年 8 月 25 日
Powered by Confluence and Scroll Viewport.