Fix Unknown Error Creating Jira Service Management Project (Data Center)

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

Summary

When trying to create a Service Management project, the error message shown:

JSM Error message

On the log:

@4000000057a9752608ec7e14 2016-08-09 01:15:56,135 http-nio-3009-exec-55 ERROR sysadmin 75x13836x1 1n2t2cu 103.233.242.8 /rest/project-templates/1.0/templates [c.a.j.project.ProjectCreateRegistrarImpl.privacy-safe] The handler with id com.atlassian.jira.project-templates-plugin:apply-project-template-handler threw an exception while handling a notification about a project being created @4000000057a9752608ec89cc com.querydsl.core.QueryException: Caught PSQLException for delete from "public"."AO_54307E_GROUP" where "AO_54307E_GROUP"."VIEWPORT_ID" = ? @4000000057a9752608ed7044 at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) @4000000057a9752608ed7044 at com.querydsl.sql.Configuration.translate(Configuration.java:453) @4000000057a9752608ed742c at com.querydsl.sql.dml.SQLDeleteClause.execute(SQLDeleteClause.java:209) ... @4000000057a9752608f18ef4 Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "AO_54307E_GROUP" violates foreign key constraint "fk_ao_54307e_grouptorequesttype_group_id" on table "AO_54307E_GROUPTOREQUESTTYPE" @4000000057a9752608f192dc Detail: Key (ID)=(1) is still referenced from table "AO_54307E_GROUPTOREQUESTTYPE".

Diagnosis

Check the customer portal contains this project name with the following query:

select * from "AO_54307E_VIEWPORT" where "KEY" like '%project_name%';

Cause

A customer portal with that project key was previously created. Deleting a Jira Service Management project after deactivating Jira Service Management will not delete the customer portal from the database. JSDSERVER-4147 - Delete Project After Deactivated SD Will Not Remove Customer Portal

Solution

It is not recommended to remove the existing customer portal from the database because the table is linked to other tables. If we removed the existing customer portal manually, it could cause inconsistency between the tables.

Use a different case order as it is case sensitive.

For example, 'desk' was used by existing customer portal, you could name your new SD project name as 'DESK' or 'Desk'.

Updated on June 18, 2025

Still need help?

The Atlassian Community is here for you.