JIRA XML Backup fails throws "java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter"
Problem
JIRA Backup fails redirecting to 500 error with the following is thrown in atlassian-jira.log
2017-04-25 11:24:57,226 localhost-1-2 INFO anonymous Backup Service [c.a.j.bc.dataimport.DefaultExportService] Data export completed in 127157ms. Wrote 495528 entities to export in memory.
2017-04-25 11:24:57,226 localhost-1-2 INFO anonymous Backup Service [c.a.j.bc.dataimport.DefaultExportService] Attempting to save the Active Objects Backup
2017-04-25 11:25:13,304 localhost-1-2 ERROR ServiceRunner [c.a.scheduler.core.JobLauncher] Scheduled job with ID 'com.atlassian.jira.service.JiraService:10001' failed due to binary incompatibilities
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.atlassian.dbexporter.node.stax.StaxStreamWriter$1.setContentAsBinary(StaxStreamWriter.java:108)
at com.atlassian.dbexporter.node.NodeBackup$RowDataNode.append(NodeBackup.java:238)
at com.atlassian.dbexporter.exporter.DataExporter.exportRow(DataExporter.java:171)
at com.atlassian.dbexporter.exporter.DataExporter.exportTable(DataExporter.java:94)
at com.atlassian.dbexporter.exporter.DataExporter.access$200(DataExporter.java:36)
at com.atlassian.dbexporter.exporter.DataExporter$1$1.call(DataExporter.java:55)
at com.atlassian.dbexporter.exporter.DataExporter$1$1.call(DataExporter.java:52)
at com.atlassian.dbexporter.jdbc.JdbcUtils.withNoAutoCommit(JdbcUtils.java:52)
at com.atlassian.dbexporter.exporter.DataExporter$1.call(DataExporter.java:52)
at com.atlassian.dbexporter.exporter.DataExporter$1.call(DataExporter.java:49)
at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:28)
at com.atlassian.dbexporter.exporter.DataExporter.export(DataExporter.java:49)
at com.atlassian.dbexporter.DbExporter.exportData(DbExporter.java:49)
Cause
An AO table has column with BLOB datatype. According to this documentation Developing your plugin with Active Objects, JIRA does not fully support BLOB datatype in AO.
Workaround
- Identify all tables that have columns with BLOB datatype (make sure to be correctly connected in your database)
-
MySQL
SELECT TABLE_SCHEMA,TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS where table_name like 'AO_%' and data_type = 'blob';
PostgressSELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE 'AO_%' AND DATA_TYPE = 'bytea';
MS SQL ServerSELECT DISTINCT ta.name AS table_name, SCHEMA_NAME(ta.schema_id) AS schema_name, c.name AS column_name, t.name AS data_type FROM sys.tables AS ta INNER JOIN sys.columns c ON ta.OBJECT_ID = c.OBJECT_ID INNER JOIN sys.types AS t ON c.user_type_id=t.user_type_id WHERE ta.name like 'AO_%' and ( t.name = 'image' OR t.name = 'varbinary' );
-
- Cleanup all data from these tables (make sure to be correctly connected in your database)
-
Clean Tables
DELETE FROM <table_name>;
-
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.
Last modified on Apr 27, 2017
Powered by Confluence and Scroll Viewport.