JIRA Issue Key is not in Sequence during Issue Creation

Still need help?

The Atlassian Community is here for you.

Ask the community

Unable to render {include} The included page could not be found.

Problem

Issue key is not following in sequence when creating issue in JIRA.

The following appears in the atlassian-jira-incoming-mail.log:

2015-10-27 09:49:03,162 WARN [XXXXX] QuartzScheduler_Worker-1 ServiceRunner    XXX XXX[10000]: Unable to create issue with message.
com.atlassian.jira.exception.CreateException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Issue][summary,XXX][status,10017][votes,0][assignee,XXX][number,11316][security,null][resolutiondate,null][type,8][timespent,null][creator,null][id,71514][reporter,XXX][project,10500][environment,null][created,2015-10-27 09:49:03.132][updated,2015-10-27 09:49:03.132][workflowId,79526][priority,5][description,
...
][timeestimate,null][duedate,null][timeoriginalestimate,null][watches,0] 
(SQL Exception while executing the following:INSERT INTO jiraissue (ID, pkey, issuenum, PROJECT, REPORTER, ASSIGNEE, CREATOR, 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: '\xE2\x80\x8BSta...' for column 'DESCRIPTION' at row 1))
	at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:200)
	at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:165)
	at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:83)
	at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:526)
	at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:513)
	at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:98)
	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:390)
	... 22 more

Diagnosis

Run the following SQL:

  • The highest issue key is.
select MAX(j.issuenum) from project p,jiraissue j where p.id=j.project and p.pname='<project name>';

(info) Replace <project name> with the respective exact project name.

  • This will tell us where the counter is, so that when the next issue is created the counter will be incremented by 1 and assigned to the issue key.
select pcounter from project where pname='<project name>';

(info) Replace <project name> with the respective exact project name.


If the SQL returns different values, then this is relevant. If the same value is being returned, then please get in touch with Atlassian Support with a fresh new Support ZIP.

MySQL note

If you are running MySQL, the counters might match, and this KB will apply anyway.  
Check for the "Incorrect string value" error followed by a string value, then check the MySQL database collation and character set.  MySQL running on utf8_bin encoding will not recognize emojis properly. 

If you would like to verify the message, you can match up the string value that is listed to a the unicode for an emoji here: https://unicode.org/emoji/charts/full-emoji-list.html


Cause

The issue creation from email is failing due to mismatch database collation.

Resolution

Please fix the database collation as per:

Last modified on May 2, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.