Error importing data while migrating Jira: "Incorrect string value"

I'm in the process of upgrading Jira from version 3.13.2 to 4.4.5. I've been following 'Migrating JIRA to Another Server' doc. While importing the XML backup into the test server I get the following exception:

Error importing data: org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting:...

...(SQL Exception while executing the following:INSERT INTO jiraaction (ID, issueid, AUTHOR, actiontype, actionlevel, rolelevel, actionbody, CREATED, UPDATEAUTHOR, UPDATED, actionnum) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Incorrect string value: '\xEF\xBF\xBDHot...' for column 'actionbody' at row 1))

This breaks the database badly, and I have to empty it out to get Jira back to setup mode... Any ideas?

2 answers

It seems one of the posts contained a control character in the body. To resolve, I've sanitized the XML data like so prior to importig again:

sed -i 's/^C//g' $XMLBACKUP #^C to be typed as ctrl V and ctrl C

.. this will be the explanation and cure for most people; your character encoding on the database and the encoding of the data in the import file do not match

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,143 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you