Issue key increments unexpectedly on new issue creation in Jira server

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

Issue count increases randomly to a high value with no apparent cause. For example, in a project with 30 issues, the next issue created should be ATP-31, but instead is something like ATP-392.

In the atlassian-jira-incoming-mail.log an error like the following will be displayed:

1 2 3 4 5 6 7 8 9 ][priority,3][timeestimate,null][duedate,null][timeoriginalestimate,null][watches,0][key,TFT-36629] (SQL Exception while executing the following:INSERT INTO jiraissue (ID, pkey, PROJECT, REPORTER, ASSIGNEE, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Incorrect string value: '\xEF\xBB\xBF \x0D\x0A...' for column 'DESCRIPTION' at row 1)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:135) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:100) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:64) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:487) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:467) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:98) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:374) ... 22 more

Cause

  • Running JIRA with a non UTF-8 file encoding

  • The JIRA database is configured with an incorrect file encoding

This is known to cause problems when creating issues that contain special characters through an email, which causes JIRA to thrown SQL exceptions when trying to store the issue, and consequently fails to create it. However, the issue key counter is increased even though the issue was not stored, hence the issue count is randomly increased.

Diagnose

  1. Verify if the System Encoding encoding is utf-8 (Administration » System Info » System Encoding). In the logs, you can see this encoding as the following:

    1 file.encoding : ANSI_X3.4-1968
  2. Check that the correct URL is used in dbconfig.xml, as in Connecting JIRA to MySQL.

  3. Verify if the JIRA database was created with the correct character encoding using the below:

    1 2 use <jira_database_name>; show variables where variable_name = 'character_set_database';

Resolution

Follow the steps under the

Resolution

section of the

SQL Exception while Updating Issues or Importing Data in JIRA with MySQL Due to Encoding

KB article.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.