Dashboard is Not Shown Correctly with NullPointerException Due to Missing Space Description ID

お困りですか?

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

コミュニティに質問

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

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

*Fisheye および Crucible は除く

症状

The Recent Activity tabs, which include Popular and All Updates tab, are not shown in the correct location, as can be seen in the screen shot below:

atlassian-confluence.log に次のメッセージが表示される。

2013-02-07 17:48:52,662 ERROR [http-8435-7] [confluence.util.velocity.VelocityUtils] writeRenderedTemplate Error occurred rendering template: com/atlassian/confluence/plugins/macros/dashboard/global-entities.vm
 -- referer: http://localhost:8435/conf/display/TEST/TEST+Home | url: /conf/dashboard.action | userName: admin | action: dashboard
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getLogoDownloadPath' in  class $Proxy112 threw exception java.lang.NullPointerException at com/atlassian/confluence/plugins/macros/dashboard/templates/space-list.vm[line 7, column 80]
	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)
	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)

....
Caused by: java.lang.NullPointerException
	at com.atlassian.confluence.pages.AttachmentDownloadPathCache.toKey(AttachmentDownloadPathCache.java:36)
	at com.atlassian.confluence.pages.CachingAttachmentManager.getAttachmentDownloadPath(CachingAttachmentManager.java:122)
....

診断

Run the following SQL query to find out if there are any spaces that contain a null Space Description ID:

SELECT * FROM SPACES WHERE SPACEDESCID IS NULL;

If the query returns one more rows, please proceed to the workaround

原因

One or more spaces do not have Space Description defined in the database level

回避策

tip/resting Created with Sketch.

Please backup your Confluence database before making any changes to your database.

Find the Problematic Space(s)

Run the following SQL query to find the problematic space(s). Please record the SPACEID for each spaces. We will refer this value as <spaceID> in the subsequent queries below.

SELECT SPACEID, SPACEKEY FROM SPACES WHERE SPACEDESCID IS NULL;

Find the Missing Space Description ID

Replace <spaceID> in this query with the value acquired from the previous step and execute the SQL query to find the missing space description ID:

SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'SPACEDESCRIPTION' AND SPACEID = <spaceID>

If the query returns one row, please record the value for CONTENTID (hereby referred as <contentID>) and proceed to "Final Step". Otherwise, please continue.

If There is NO Space Description Defined

  • Confluence を停止します。
  • Let's try to find the next CONTENTID, so that we can insert a space description row in the CONTENT table. Please execute this query and record the value somewhere. We'll refer this value as <contentID> in the subsequent queries for next steps.

    SELECT MAX(CONTENTID)+1 FROM CONTENT;
  • Replace <contentID> and <spaceID> in this query with the values acquired from the previous steps. After that, run the SQL query to insert a new space description for the problematic space into CONTENT table:

    INSERT INTO CONTENT VALUES (<contentID>, 2, 'SPACEDESCRIPTION', NULL, NULL, 1, NULL, NOW(), NULL, NOW(), '', NULL, 'current', NULL, <spaceID>, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
  • Find the next BODYCONTENTID, so that we can insert the space description itself into BODYCONTENT table. We'll refer this value as <bodycontentID>in the subsequent query for next step.

    SELECT MAX(BODYCONTENTID)+1 FROM BODYCONTENT;
  • Replace <bodycontentID> and <contentID> with the values acquired from the previous steps. After that, run this query to insert a new value into BODYCONTENT table:

    INSERT INTO BODYCONTENT VALUES (<bodycontentID>, '', <contentID>, 0);

Final Step

  • Replace <contentID> and <spaceID> in the SQL query below with the values acquired from the previous steps. After that, run the query to update the Space Description ID:

    UPDATE SPACES SET SPACEDESCID = <contentID> WHERE SPACEID = <spaceID>;
  • Restart Confluence or go to Confluence Admin > Cache Statistics and click Flush All

最終更新日: 2024 年 12 月 18 日

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

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