Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error "We can't create this issue for you right now..." | Duplicated INSERT to OS_WFENTRY

Edited

Hi, I've recently upgraded my Jira Server from 8.13.3 LTS to 8.20.2 LTS. Besides that I've also changed database from PostgreSQL 10 to PostgreSQL 13.

Of course I know that is unsupported version, but it depended on many other factos and back to older version is the last resort (if that is the reason of my problems)


Error pops up when creating a issue, entire messege in GUI sounds like this:
"We can't create this issue for you right now, it could be due to unsupported content you've entered into on ore more of the issue field. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file"


I've checked logs (atlassian-jira-sql.log) and usually when this error pops up the following situation happens:

2022-01-14 16:59:23,777+0100 http-nio-8080-exec-24 karol.siedlaczek 1019x604319x1 128lwzv /secure/QuickCreateIssue.jspa 2ms "INSERT INTO public.OS_WFENTRY (ID, NAME, INITIALIZED, STATE) VALUES ('183644', 'SUP: Service Request workflow', 'null', '0')"
2022-01-14 16:59:23,778+0100 http-nio-8080-exec-24 karol.siedlaczek 1019x604319x1 128lwzv /secure/QuickCreateIssue.jspa 1ms "SELECT NAME, INITIALIZED, STATE FROM public.OS_WFENTRY WHERE ID='183644'"
2022-01-14 16:59:23,780+0100 http-nio-8080-exec-24 karol.siedlaczek 1019x604319x1 128lwzv /secure/QuickCreateIssue.jspa 2ms "INSERT INTO public.OS_WFENTRY (ID, NAME, INITIALIZED, STATE) VALUES ('183644', 'SUP: Service Request workflow', 'null', '0')"
org.postgresql.util.PSQLException:
    ERROR: duplicate key value violates unique constraint "pk_os_wfentry" Detail: Key (id)=(183644) already exists.

So as you can see INSERT command to os_wfentry table is duplicated and this is a reason of error because it refers to the same id 


This is error from atlassian-jira.log:

2022-01-14 16:59:23,996+0100 http-nio-8080-exec-24 ERROR karol.siedlaczek 1019x604319x1 128lwzv 10.255.4.222,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [c.a.j.bc.issue.DefaultIssueService] Error creating issue:
com.atlassian.jira.exception.CreateException: Could not create workflow instance: root cause: while inserting: [GenericEntity:OSWorkflowEntry][name,SUP: Service Request workflow][id,183644][state,0] (SQL Exception while executing the following:INSERT INTO public.OS_WFENTRY (ID, NAME, INITIALIZED, STATE) VALUES (?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_os_wfentry"
Detail: Key (id)=(183644) already exists.))

And this is the correct flow of creating issue in shorter version:
INSERT INTO public.OS_WFENTRY (creating record for wf, currently with state=0)
INSERT INTO public.OS_CURRENTSTEP (creating status, I think so)
INSERT INTO public.jiraissue (creating issue)
UPDATE public.OS_WFENTRY (update to set state=1)

So finally my question - Why in some cases Jira duplicates INSERT to OS_WFENTRY? It interrupts entire further creation process because of PSQLException
Thanks you in advance for helping everyone interested

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.2
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

73 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you