SQL Exception while Installing JIRA Due to Database 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
While installing JIRA for first time, the following error appears in the atlassian-jira.log
:
1
SQL Exception while executing the following:INSERT INTO changeitem (ID, groupid, FIELDTYPE, FIELD, OLDVALUE, OLDSTRING, NEWVALUE, NEWSTRING) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (Data truncation: Data truncated for column 'NEWSTRING' at row 1))
Cause
The database wasn't set to UTF-8 character encoding during creation.
Resolution
Recreate the JIRA database as UTF-8, and re-install JIRA:
Backup the existing data
Create a new database with the following command:
1
CREATE DATABASE jiradb CHARACTER SET utf8;
Point JIRA to new database and restart JIRA
Restore the existing backup XML
Was this helpful?