JIRA Crashes and Throws 'Unknown workflow name' Error
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
The message below is displayed in the log:
1 2
2010-12-09 11:13:25,957 http-8080-21 ERROR xxxxx 673x21425x1 xxxxxxx 127.0.0.1 /sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml [atlassian.jira.workflow.OSWorkflowManager] Could not get workflow called: Sample One Workflow: com.opensymphony.workflow.FactoryException: Unknown workflow name com.opensymphony.workflow.FactoryException: Unknown workflow name
Running the integrity checker does not help
The reported workflow does exist in JIRA (in this case called 'Sample One Workflow'). To confirm, go to Administration > Global Settings > Workflows
The workflow also exists in the database table jiraworkflows but it is using different letter case (either lower or upper case)
All JIRA workflows went missing in JIRA User Interface but workflow scheme still showing the data.
ℹ️ If you get the fifth symptom, please jump to the resolution no.5.
Cause
This is due to a database integrity issue.
Resolution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Shutdown JIRA;
Get the workflow ID by searching for the workflow:
1
SELECT * FROM jiraworkflows;
Update the workflowname for the related workflow to have the correct letter case:
1
update jiraworkflows set workflowname='<Workflow_Name>' where ID=xxxxxx;
If the above does not work, it could be the case the defined workflow to workflow scheme has conflicting case sensitive names. In this case, verify with:
1
select * from workflowschemeentity where workflow like '<Workflow_Name>';
You should find both your workflows above (uppercase, lowercase, etc). Then you should try:
1
update workflowschemeentity set workflow = '<Final_Workflow_Name>' where workflow in (select workflow from workflowschemeentity where workflow like '<Workflow_Name>');
Be very cautious with the above. Try on a test system first and be sure to double-check your instance afterwards.
MySQL Note
If you are running on MySQL, it will not let you run an update query on a table referencing the same table in where clause. In that case, feel free to run both queries independently, getting the id's from the nested query and pasting them on the main query:
1
select ID from workflowschemeentity where workflow like '<Workflow_Name>';
and then
1
update workflowschemeentity set workflow = '<Final_Workflow_Name>' where id in ('<IDs returned from the previous query>');
This resolution only apply for Symptoms 5:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
--Search for the JIRA workflow name that is not match with the workflow scheme entity select * from workflowschemeentity where workflow not in (select workflowname from jiraworkflows); --Get the workflow ID by searching for the workflow SELECT * FROM jiraworkflows; --Update the JIRA workflow to the correct name update jiraworkflows set workflowname = '<Workflow_Name>' where id = xxxxx; --Search for the JIRA workflow name that is not match with the workflow scheme entity for the second time select * from workflowschemeentity where workflow not in (select workflowname from jiraworkflows); --Update the JIRA workflow scheme entity to the final workflow name that you had updated update workflowschemeentity set workflow = '<Final_Workflow_Name>' where workflow not in (select workflowname from jiraworkflows);
Restart JIRA
After that:
Run the integrity checker under Administration. That might show you that some of your issues have been left incapacitated because of the above change. For example, issues might be left in status Open while <Final_Workflow_Name> has not such status.
In that case, you can add a status Open in your workflow so that you can access those issues.
Open those issues and Clone them. The new issues are fine, following the correct workflow consistently.
Delete the old issues.
Was this helpful?