Relation "PROJECT" does not exist error : Server to cloud migration
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
How to avoid the "PROJECT" does not exist error while selecting the project during the Choose what to migrate step in server to Cloud Migration
Overview
During server to cloud Migraiton, while selecting the project during the Choose what to migrate migration option we get a communication error. On atlassian-jira.log, we can see the following error
2023-11-13 11:51:42,781 http-nio-8080-exec-10 ERROR z610483 711x1023993x2 7ezvqr 10.21.134.43,127.0.0.1 /rest/migration/latest/stats/server [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: com.querydsl.core.QueryException: Caught PSQLException for select "PROJECT"."ID", "PROJECT"."PKEY", "PROJECT"."PNAME", "PROJECT"."PROJECTTYPE", "PROJECT"."LEAD", "issuecount", "lastactive", "totalattachmentsize", "totalattachmentcount", (select "PROJECTCATEGORY". .
.
com.google.common.util.concurrent.UncheckedExecutionException: com.querydsl.core.QueryException: Caught PSQLException for select "PROJECT"."ID", "PROJECT"."PKEY", "PROJECT"."PNAME", "PROJECT"."PROJECTTYPE", "PROJECT"."LEAD", "issuecount", "lastactive", "totalattachmentsize", "totalattachmentcount", (select "PROJECTCATEGORY"."CNAME" from "PROJECTCATEGORY" . . .
.
Caused by: org.postgresql.util.PSQLException: ERROR: relation "PROJECT" does not exist
Position: 687
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
Root Cause
PostgreSQL conducts a case-sensitive search when objects are enclosed in double quotes. The default database schema of Jira has the PROJECT table in lowercase, and the absence of a schema definition in the dbconfig.xml file triggers this issue. It's important to verify if the dbconfig.xml file contains the parameters specified in the guide Connecting Jira applications to PostgreSQL.
Solution
Stop Jira service
Add the below line in dbconfig.xml which is located under $JIRA_HOME
<schema-name>public</schema-name>
Start Jira service