Can't Restore XML Backup Due To Invalid Encoding

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

Crowd reports the following error when restoring an XML backup;

1 2 3 4 5 2009-01-30 16:03:44,175 http-8095-Processor25 INFO [util.persistence.hibernate.ConfigurableLocalSessionFactoryBean] Creating database schema for Hibernate SessionFactory 2009-01-30 16:03:44,222 http-8095-Processor25 ERROR [console.action.setup.Import] Error importing XML data org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at org.dom4j.io.SAXReader.read(SAXReader.java:358)

Cause

The File Encoding is not set to UTF-8

Resolution

This is a known issue with Crowd version 1.5 and below. If you're seeing this issue, please see this workaround on how to perform a new backup with the proper file encoding.

If you no longer have access to your old Crowd instance, and only have the XML backup, you can edit the backup using XML Notepad to indicate which lines contain characters that must be corrected before a restore can succeed.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.