XML Backup of Crowd database fails with NullPointerException

お困りですか?

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

コミュニティに質問

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

要約

Performing an XML backup of the Crowd instance can fail with a java.lang.NullPointerException error.

環境

Crowd Server and Data Center

診断

Within the application log, check for the following NPE exception:

Stack trace :
java.lang.NullPointerException
at com.atlassian.crowd.migration.MembershipMapper.addMembershipToXml(MembershipMapper.java:124)
at com.atlassian.crowd.migration.MembershipMapper.exportXml(MembershipMapper.java:87)
at com.atlassian.crowd.migration.XmlMigrator.exportXml(XmlMigrator.java:36)


If the stack trace for this null pointer exception references the addition of memberships to the XML like the one indicated above, follow the Solution from this article.

原因


This can occur if users or groups were deleted from the Crowd instance in the past but the membership entry did not get deleted from the database.  In this case, a child_id or parent_id value in the CWD_MEMBERSHIP table is updated with a null.

ソリューション

Verify if there's a null value for either of these columns in the CWD_MEMBERSHIP table:

select * from CWD_MEMBERSHIP where child_id = null OR parent_id = null;

If results are returned, delete the problematic entry:

(warning) Before proceeding, make sure that you have:

* Shutdown Crowd
* Have the most recent, full backup of your Crowd database

delete from CWD_MEMBERSHIP where child_id = null OR parent_id = null;

Startup Crowd and perform the XML backup again.


最終更新日 2020 年 5 月 20 日

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

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