"Could not read fields for table" error when creating an XML backup in Confluence
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Symptoms
When trying to create site XML backup in Confluence, it will fail with one of the following errors:
com.atlassian.confluence.importexport.ImportExportException: java.lang.RuntimeException: Could not read fields for table AO_563AEE_ACTIVITY_ENTITY
2015-06-20 15:31:12,110 ERROR [http-bio-8443-exec-23] [[Standalone].[localhost].[/].[action]] log Servlet.service() for servlet [action] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
2015-07-22 12:13:29,567 WARN [http-nio-8080-exec-5] [confluence.util.profiling.DefaultActivityMonitor] close Exceeded the threshold of 60000 ms: ActivitySnapshot{startTime=1437559852430, threadId=169, threadName='http-nio-8080-exec-5', userId='admin', type='web-request', summary='/admin/dobackup.action?atl_token=1f2062a607d81112497e87eedc01a993e8bdd1c7&backupAttachments=true&backup=Sichern'}
-- referer: http://0.0.0.0:8080/admin/backup.action | url: /admin/dobackup.action | userName: admin
2015-07-22 12:13:29,567 ERROR [http-nio-8080-exec-5] [[Standalone].[localhost].[/].[action]] log Servlet.service() for servlet [action] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter not found by com.atlassian.activeobjects.activeobjects-plugin [10]
Cause
Confluence cannot read or backup an unknown ActiveObjects table data. This can be caused by a corrupt Confluence table, or a Jira table if the Confluence instance uses the same database as a Jira instance.
Resolution
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
If your logs show the "could not read fields for table..." error mentioned above that identifies the offending table, simply drop the table mentioned in the error. Otherwise, take the following steps to increase logging and identify the table that nees to be dropped:
- Go to > General Configuration > Logging and Profiling
Add new entry "com.atlassian.activeobjects.confluence.backup" and set it to "INFO".
Save the changes and verify the class has been turned on.
- Try to perform the backup again.
- Go to atlassian-confluence.log and search for the string "beginDatabaseInformationBackup"
- Scroll down to find the last table before Confluence returns with the same "ERROR" message described above.
- Drop the table from the database, then re-attempt the export.
For more information on logging and profiling, see Configuring Logging.
Known Issues
Other than caused by JIRA AO tables as mentioned above, the table "AO_DCA036_ENCRYPTION_KEY" from Encryption add-on developed by ServiceRocket has been observed to causing this issue.