Could not access Space directory
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
症状
When clicking Browse >> Space Directory, the returned page does not display in a web browser and the following appears in the atlassian-confluence.log
:
ERROR [http-8090-2] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/templates/spacedirectory.vm'
-- url: /spacedirectory/view.action | userName: adam | referer: http://sentinel:8090/dashboard.action | action: view
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getLogoDownloadPath' in class com.atlassian.confluence.plugins.spacedirectory.ViewSpaceDirectoryAction threw exception java.lang.NullPointerException at /templates/spacedirectory.vm[line 65, column 59]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
...
And,
ERROR [http-8090-4] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/templates/spacedirectory.vm'
-- referer: http://192.168.84.245:8090/dashboard.action | url: /spacedirectory/view.action | userName: peter.ko | action: view
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getBodyAsString' in class com.atlassian.confluence.spaces.SpaceDescription$$EnhancerByCGLIB$$ee053320 threw exception java.lang.UnsupportedOperationException: The body of this ContentEntityObject ('') was 'BodyType:XHTML' but was expected to be 'BodyType:WIKI' at /templates/spacedirectory.vm[line 79, column 75]
原因 1
This issue is caused by a corrupted index. Confluence is trying to fetch information about the spaces from the available index, and then retrieve the data from the database. Some of the spaces referenced in the index could not be found in the database, thus this error thrown.
原因 2
This error occurs for new installations of 4.0.3, and not getting fixed by upgrade. This is tracked: CONF-24282
ソリューション 1
Since the issue is caused by corrupted index, rebuilding the index from scratch should solve the issue.
ソリューション 2
As a workaround you may:
1- Open this URL in your browser: <Confluence-URL>/admin/force-upgrade.action
2- Select *changeSpaceDescriptionsBodyTypeUpgradeTask* in the Upgrade task to run dropdown list.
3- Choose Force Upgrade.