Cannot Restore XML Backup Due to Data Truncation - MySQL Driver 3.1
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
Symptoms
When importing a backup or space export, the import fails with this message in your logs:
1
2
3
4
5
6
7
8
9
10
11
12
13
008-04-03 13:43:16,824 ERROR [Importing data task] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session
-- url: /admin/restore-local-file.action | userName: admin | action: restore-local-file
2008-04-03 13:43:16,824 ERROR [Importing data task] [confluence.importexport.impl.ReverseDatabinder] endElement net.sf.hibernate.exception.GenericJDBCException: could not insert: [bucket.user.propertyset.BucketPropertySetItem#bucket.user.propertyset.BucketPropertySetItem@2fbee3c2]
-- url: /admin/restore-local-file.action | userName: admin | action: restore-local-file
net.sf.hibernate.exception.GenericJDBCException: could not insert: [bucket.user.propertyset.BucketPropertySetItem#bucket.user.propertyset.BucketPropertySetItem@2fbee3c2]
at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)
...
...
Caused by: java.sql.SQLException: Data too long for column 'boolean_val' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2001)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2281)
Cause
A MySQL 3.0 jdbc driver (or other drivers pre 3.1 jdbc drivers) are not compatible with MySQL 4.x, 5.x and confluence (Please refer to Database Setup for MySQL).
Resolution
Upgrade to the latest jdbc driver for MySQL which you can download from here.
Was this helpful?