Affects Version/s: 5.9.9, 5.10.4
Fix Version/s: 6.0.2
Component/s: Page - Export / Import
Creating an XML Backup using Oracle JDBC driver 126.96.36.199 doesn't properly export the Active Objects tables sequence definitions.
- Confluence 5.9.9
- Oracle Database 12c Enterprise Edition Release 188.8.131.52.0 - 64bit Production
- Download the Oracle JDBC driver 184.108.40.206 from Oracle's website and place into <confluence_install>/confluence/WEB-INF/lib/.
- Connect Confluence to Oracle via direct JDBC as per Database Setup for Oracle
- Generate an XML backup via Confluence Admin > Backup & Restore.
Sequence definitions for Active Object tables are exported.
This can be inspected by extracting the XML Backup and browsing the plugin-data/com.atlassian.activeobjects.confluence.spi/activeObjectsBackupRestoreProvider.pdata file.
Using the table AO_9412A1_AOUSER as an example, we would expect the autoIncrement attribute for the ID column definition (the primary key) set to true, as following:
The primary keys for the tables in the plugin-data/com.atlassian.activeobjects.confluence.spi/activeObjectsBackupRestoreProvider.pdata file have their autoIncrement attribute set to false.
Using the previous example (AO_9412A1_AOUSER.ID)
Importing this XML Backup into a new Confluence instance will corrupt the data and break several Confluence functionalities, including inline tasks and plugins that rely on Active Objects such as Team Calendars. Administrators can expect errors to be printed in Confluence logs which indicate that sequences are missing. The below snippet is an example following an XML import into a Postgres database:
This was reproducible on Confluence 5.9.9 but likely affects all prior versions supporting Oracle 12c (Confluence 5.7+)
Modify the plugin-data/com.atlassian.activeobjects.confluence.spi/activeObjectsBackupRestoreProvider.pdata file such that the primary key of each AO table has autoIncrement set to "true". This will ensure that once imported, the correct sequences will be created for the primary keys.
When generating an XML backup, temporarily revert to the Oracle JDBC 220.127.116.11 driver instead.