XML Backup of Crowd database fails with NullPointerException

お困りですか?

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

コミュニティに質問

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

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

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

環境

Crowd Server および 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.