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

STM Systems May 16, 2012

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

0 votes
Deleted user June 20, 2012

https://confluence.atlassian.com/pages/viewpage.action?pageId=211649893

.. 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

0 votes
STM Systems May 16, 2012

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

Suggest an answer

Log in or Sign up to answer