"Could not read fields for table" error when creating an XML backup in Confluence
症状
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]
原因
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.
ソリューション
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
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.
既知の問題
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.