Space XML Import Fails with Violation of PRIMARY KEY Constraint in OS_PROPERTYENTRY Related to Third Party Plugin Class

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

問題

Importing Space XML backup fails with the following errors seen in the UI

Import failed. Check your server logs for more information. com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: could not insert: [bucket.user.propertyset.BucketPropertySetItem#BucketPropertySetItem[entityId=175966075,entityName=confluence_ContentEntityObject,key=net.customware.confluence.plugin.toc:cached:1,type=6,boolean=false,string=,text=


Similarly, the following error logs appears in the atlassian-confluence.log:

2016-02-28 16:40:35,509 ERROR [Long running task: Importing data] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Violation of PRIMARY KEY constraint 'PK_OS_PROPERTYENTRY_7C3A67EB'. Cannot insert duplicate key in object 'dbo.OS_PROPERTYENTRY'. The duplicate key value is (confluence_ContentEntityObject, 199343510, com.adaptavist.bubbles.forum.FORUM_TOPIC_PAGE).

As we can seem this error seems to be related to the class com.adaptavist.bubbles.forum.FORUM_TOPIC_PAGE or Community Bubbles Plugin by Adaptavist. This plugin has been discontinued since the release of confluence 5.0.

Other observed errors are:

  1. Related to the class net.customware.confluence.plugin.toc. This plugin is no longer available as it has been upgraded to Table Of Contents plugin.

    Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__OS_PROPERTYENTRY__7C3A67EB'. Cannot insert duplicate key in object 'dbo.OS_PROPERTYENTRY'. The duplicate key value is (confluence_ContentEntityObject, 175966075, net.customware.confluence.plugin.toc:cached:1).
  2. Related to the class "socialbookmarkingurl". This plugin no longer available in Atlassian Marketplace

    Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__OS_PROPERTYENTRY__7C3A67EB'. Cannot insert duplicate key in object 'dbo.OS_PROPERTYENTRY'. The duplicate key value is (confluence_ContentEntityObject, 175966193, socialbookmarkingurl).

If the error is related to the class "confluence.inline.tasks.sequence.last":

Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__OS_PROPERTYENTRY__7C3A67EB'. Cannot insert duplicate key in object 'dbo.OS_PROPERTYENTRY'. The duplicate key value is (confluence_ContentEntityObject, 175966193, confluence.inline.tasks.sequence.last,type=5,boolean=false,string=2,text=,int=0,double=0.0,long=0,date=).

Do not proceed with this documentation and contact Atlassian Support instead. This is because "confluence.inline.tasks.sequence.last" is confluence bundled plugin and deleting might result in data loss with some inline tasks.

原因

This issue is caused by slightly corrupted database. These data in the database are caches that should have been deleted when upgrading the plugins mentioned above.

診断

Make sure the third party plugins mentioned in the error logs does not exist anymore in the instance.

If none of the offending third party present, continue with Resolution

ソリューション

  1. Shut down the source Confluence instance 
  2. 次の SQL クエリを実行します。

    DELETE FROM OS_PROPERTYENTRY WHERE entity_key = '<confluence_entity_key>';

    データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  3. Once those entries are removed, followed by a full cache flush in Confluence Admin >> Cache Statistics >> Flush All. Proceed with generating the XML export again.

Replace the '<confluence_entity_key>' with the entity key that the error mentioned. For example:

DELETE FROM OS_PROPERTYENTRY WHERE entity_key = 'net.customware.confluence.plugin.toc';
DELETE FROM OS_PROPERTYENTRY WHERE entity_key = 'com.adaptavist.bubbles.forum.FORUM_TOPIC_PAGE';
DELETE FROM OS_PROPERTYENTRY WHERE entity_key = 'socialbookmarkingurl';

最終更新日 2018 年 11 月 14 日

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

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