Project Does not Exist Error When Trying to Use the Jira Cloud Migration Assistant
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
My Jira environment uses a postgres database. When I try to migrate from on-prem to Jira Cloud, I encounter an error indicating that the table "PROJECT" does not exist.
Environment
>=Jira 7.6.0 with a Postgres database.
Diagnosis
You will see an error similar to this appear on the Jira Cloud Migration App screen, and also in the atlassian-jira.log file.
1
2
3
4
5
6
7
8
9
10
11
12
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" "PROJECTCATEGORY" inner join "NODEASSOCIATION" "NODEASSOCIATION" on "PROJECTCATEGORY"."ID" = "NODEASSOCIATION"."SINK_NODE_ID"
where "NODEASSOCIATION"."SOURCE_NODE_ID" = "PROJECT"."ID" and "NODEASSOCIATION"."ASSOCIATION_TYPE" = ?) as "pcategory",
(select count(distinct "PROPERTYENTRY"."propertytype") from "PROPERTYENTRY" "PROPERTYENTRY" where "PROPERTYENTRY"."ENTITY_ID" = "PROJECT"."ID" and "PROPERTYENTRY"."PROPERTY_KEY" = ?) as "parchived"
from "PROJECT" "PROJECT"
left join (select "JIRAISSUE"."PROJECT", count(distinct "JIRAISSUE"."ID") as "issuecount", max("JIRAISSUE"."UPDATED") as "lastactive", sum("FILEATTACHMENT"."FILESIZE") as "totalattachmentsize", count("FILEATTACHMENT"."ID") as "totalattachmentcount" from "JIRAISSUE" "JIRAISSUE"
left join "FILEATTACHMENT" "FILEATTACHMENT" on "JIRAISSUE"."ID" = "FILEATTACHMENT"."ISSUEID" group by "JIRAISSUE"."PROJECT") as "ia" on "ia"."PROJECT" = "PROJECT"."ID"
where "PROJECT"."PROJECTTYPE" in (?, ?)
...
...
...
Caused by: org.postgresql.util.PSQLException: ERROR: relation "PROJECT" does not exist
Cause
The query that Jira is trying to use while looking for Project related data is written with differing syntax and the table names, and parameters. The error occurs because the postgres database settings from the dbconfig.xml is missing the <schema-name> clause which effectively puts the database into "case sensitive" mode, invalidating the query from the JCMA plugin.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>postgres72</database-type>
<jdbc-datasource>
<url>jdbc:postgresql://[removed-by-support]/jira</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>[removed-by-support]</username>
<password>[removed-by-support]</password>
<pool-min-size>30</pool-min-size>
<pool-max-size>30</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-max-idle>30</pool-max-idle>
<pool-prepared-statements>true</pool-prepared-statements>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-on-borrow>false</pool-test-on-borrow>
<pool-test-while-idle>true</pool-test-while-idle>
<connection-properties>tcpKeepAlive=true;socketTimeout=240</connection-properties>
</jdbc-datasource>
</jira-database-config>
Solution
Update your dbconfig.xml to include <schema-name>public</schema-name>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>postgres72</database-type>
<schema-name>public</schema-name>
<jdbc-datasource>
<url>jdbc:postgresql://[removed-by-support]/jira</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>[removed-by-support]</username>
<password>[removed-by-support]</password>
<pool-min-size>30</pool-min-size>
<pool-max-size>30</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-max-idle>30</pool-max-idle>
<pool-prepared-statements>true</pool-prepared-statements>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-on-borrow>false</pool-test-on-borrow>
<pool-test-while-idle>true</pool-test-while-idle>
<connection-properties>tcpKeepAlive=true;socketTimeout=240</connection-properties>
</jdbc-datasource>
</jira-database-config>
Was this helpful?