Confluence XML Import Fails With Discussion Plugin Errors

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

Summary

Confluence XML Import Fails with Discussion Plugin Errors.

Environment

  • Confluence server and Data Center.

  • Third-party app Discussion installed.

Diagnosis

The following appears in atlassian-confluence.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2020-07-29 11:59:24,763 INFO [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Beginning import by user admin 2020-07-29 11:59:24,795 INFO [Long running task: Importing data] [atlassian.plugin.manager.DefaultPluginManager] broadcastPluginDisabling Disabling com.atlassian.confluence.plugins.synchrony-interop ... 2020-07-29 12:20:08,990 ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /c6159/longrunningtaskxml.action | referer: http://localhost:26159/c6159/admin/restore-local-file.action | traceId: 3afdc5b935204c0e | userName: admin | action: longrunningtaskxml com.atlassian.confluence.importexport.ImportExportException: com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: There was an error during import/export with <unknown plugin> (table AO_0FD6DB_DISCUSSION): at com.atlassian.activeobjects.confluence.backup.ActiveObjectsBackupRestoreProvider.restore(ActiveObjectsBackupRestoreProvider.java:49) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importPluginData(FileBackupImporter.java:407) ... Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO "AO_0FD6DB_DISCUSSION" ("ARCHIVED", "CATEGORY_ID", "CREATION_DATE", "CREATOR", "ID", "LIKES", "PAGE_ID", "RESOLVED_COMMENTS_ID", "SPACE_KEY", "STATUS", "TYPE", "VIEWS") VALUES ('FALSE', NULL, '2015-03-24 16:42:05-05', 'admin', '1', '0', '3572190', NULL, '~admin', 'IN_DISCUSS', 'DISCUSSION', '78') was aborted: ERROR: null value in column "CATEGORY_ID" violates not-null constraint Detail: Failing row contains (f, null, 2015-03-24 16:42:05, admin, 1, 0, 3572190, null, ~admin, IN_DISCUSS, DISCUSSION, 78). Call getNextException to see other errors in the batch. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148) ... Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "CATEGORY_ID" violates not-null constraint Detail: Failing row contains (f, null, 2015-03-24 16:42:05, admin, 1, 0, 3572190, null, ~admin, IN_DISCUSS, DISCUSSION, 78). at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2476)

Cause

Discussions data is corrupted in the XML backup with the error message null value in column "CATEGORY_ID" violates not-null constrainton the table "AO_0FD6DB_DISCUSSION".

Solution

If the Discussions data is no longer needed, then the entries can be removed in activeObjectsBackupRestoreProvider.pdata

  1. Unzip the XML backup

  2. Remove the entries related to the discussion data in activeObjectsBackupRestoreProvider.pdata. The following are the headers for related entries to Discussion data

    1 2 3 4 <table name="AO_0FD6DB_DISCUSSION"> <table name="AO_0FD6DB_DISCUSSION_CATEGORY"> <data tableName="AO_0FD6DB_DISCUSSION"> <data tableName="AO_0FD6DB_DISCUSSION_CATEGORY">
  3. Rezip the files back together and try the restore again.

Updated on March 11, 2025

Still need help?

The Atlassian Community is here for you.