List Pages Tree View Loads Forever
症状
The list pages tree view in a particular space loads forever. Other spaces work fine. The log file contains this error:
2009-12-18 17:48:42,905 WARN [http-8080-2] [opensymphony.xwork.util.OgnlValueStack] findValue Caught an exception while evaluating expression 'JSONString' against value stack
-- space: 10059777 | url: /pages/children.action | page: 10027011 | userName: admin | referer: http://yourconfluenceurl/pages/listpages-dirview.action?key=spacekey | action: children
java.lang.RuntimeException: Caught an Ognl exception while getting property JSONString
java.lang.RuntimeException: Caught an Ognl exception while getting property JSONString
at com.opensymphony.xwork.util.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:112)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1603)
at ognl.ASTProperty.getValueBody(ASTProperty.java:96)
:
:
/-- Encapsulated exception ------------\
java.lang.NullPointerException
at com.atlassian.confluence.pages.NaturalStringComparator.compareNatural(NaturalStringComparator.java:75)
at com.atlassian.confluence.pages.NaturalStringComparator.compareNatural(NaturalStringComparator.java:57)
at com.atlassian.confluence.pages.NaturalStringComparator.compare(NaturalStringComparator.java:42)
at com.atlassian.confluence.pages.Page$ChildPositionComparator.compare(Page.java:313)
at com.atlassian.confluence.pages.Page$ChildPositionComparator.compare(Page.java:282)
at java.util.Arrays.mergeSort(Arrays.java:1270)
at java.util.Arrays.mergeSort(Arrays.java:1282)
原因
When accessing functionality that requires a page title comparison, Confluence will throw a NullPointerException if the page title is null.
ソリューション
Identify the page title(s) that is null:
Run the following database query, to determine the pages with null titles:
SELECT c.CONTENTID FROM SPACES s, CONTENT c WHERE s.SPACEID = c.SPACEID AND s.SPACEKEY = '<your_space_key>' AND c.CONTENTTYPE = 'PAGE' AND c.TITLE IS NULL;
Note the contentids returned by this query.
If this query returns any data, do the following to update the title:
Update the page title:
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
- Confluence を停止します。
Run the following query. Make sure that the titles are unique to the space:
update content set title = '<desired.title>' where contentid = <contentid>;
<contentid> is the contentid returned by the select query.
Confluence を再起動します。