Can't create XML backup due to backupEntities Couldn't backup database data

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

Problem

Can't create Confluence XML backup when Confluence connects to MySQL.

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2015-03-19 11:39:48,665 ERROR [http-bio-8080-exec-66] [confluence.importexport.impl.AbstractXmlExporter] backupEntities Couldn't backup database data. -- referer: http://<URL>/admin/backup.action | url: /admin/dobackup.action | userName: user | action: dobackup java.lang.RuntimeException: net.sf.hibernate.exception.GenericJDBCException: could not load: [com.atlassian.confluence.links.ReferralLink#14352410] at com.atlassian.confluence.importexport.impl.HibernateObjectHandleTranslator.handleToObject(HibernateObjectHandleTranslator.java:64) at com.atlassian.hibernate.extras.XMLDatabinder.writeObjects(XMLDatabinder.java:190) at com.atlassian.hibernate.extras.XMLDatabinder.toGenericXML(XMLDatabinder.java:169) at com.atlassian.confluence.importexport.impl.AtlassianXMLDatabinder.toGenericXML(AtlassianXMLDatabinder .. Caused by: net.sf.hibernate.exception.GenericJDBCException: could not load: [com.atlassian.confluence.links.ReferralLink#14352410] at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90) at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79) ... 310 more Caused by: java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 6 to TIMESTAMP. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:986) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:981) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) .. Caused by: java.sql.SQLException: Value '[B@3efce2ce' can not be represented as java.sql.Timestamp at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:986)

Cause

In some unknown situation MySQL can't convert timestamp value and thrown mentioned error.

Workaround

Add zeroDateTimeBehavior=convertToNull into Database's URL with following steps:

  1. Shut down Confluence

  2. Edit <Confluence Home>/confluence.cfg.xml file and change "hibernate.connection.url" to:

    1 jdbc:mysql://<DB URL>/<dbname>?autoReconnect=true&amp;zeroDateTimeBehavior=convertToNull

    ℹ️ Please replace <DB URL> and <dbname> to your database URL and database name.

  3. Start Confluence

  4. Try to generate a backup.

  5. Clear Confluence plugins cache.

  6. Rebuild the content indexes from scratch

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.