Issue key increments unexpectedly on new issue creation in Jira server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

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:

][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

 

原因

  • 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:

         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:

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

ソリューション

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.

 

 

最終更新日 2019 年 9 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.