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

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

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

The following appears in the atlassian-confluence.log

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:

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

    (info) 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

 

 

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.