Unable to create a new Service Desk

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2019

Hello everybody!!! 

I have this issue right now. And i am quite stuck here.

Information:

I have created a service desk,and i have imported everything from the other Jira SD that is used. Everything worked fine.

Then i decided to delete it and the recreated for test purposes. Same project name, same project key , same leader! And worked everything again.

Well now i delete it one more time and tried to recreate it but i have the following Errors. The last time i tried to encounter the issue was just to clean the Jira cache from the built-in scripts and went well... but now i tried again and nothing :( 

The good thing is that i encounter this issue in a test environment. 

The bad thing is that i am not finding a solution yet and can not find a way to deal with it. 

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
com.querydsl.core.QueryException: Caught MySQLIntegrityConstraintViolationException for delete from `AO_54307E_GROUP` where `AO_54307E_GROUP`.`VIEWPORT_ID` = ?
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
Cannot delete or update a parent row: a foreign key constraint fails (`jiradbtest`.`ao_54307e_grouptorequesttype`, CONSTRAINT `fk_ao_54307e_grouptorequesttype_group_id` FOREIGN KEY (`GROUP_ID`) REFERENCES `ao_54307e_group` (`ID`))
Unable to run plugin code because of 'com.querydsl.core.QueryException - 
Caught MySQLIntegrityConstraintViolationException for delete from `AO_54307E_GROUP` where `AO_54307E_GROUP`.`VIEWPORT_ID` = ?'.

2019-01-21 15:19:03,349 http-nio-8085-exec-9 ERROR admin 919x3364x1 8ar5xq 0:0:0:0:0:0:0:1 /rest/project-templates/1.0/templates [c.a.p.r.c.error.jersey.ThrowableExceptionMapper]
Uncaught exception thrown by REST service: An error occurred while notifying that a project was created

 If you want more info i could provide the log beneath theses errors too.

Best regards

CM

1 answer

1 accepted

1 vote
Answer accepted
Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2019

@Christos Moysiadis Looks like your JIRA database has become corrupted because of multiple attempts to import Jira SD data. There is some data left behind which was supposed to be deleted properly before attempting another import.

 

To resolve this issue, I would suggest to go by database constraint violation errors in the logs and delete the relevant foreign key constraint enteries (reported in the logs) directly from the JIRA database. Then restart and re-attempt the data import for your JSD project.

 

NOTE: Please take a backup of JIRA database before making any changes to the database, in case the database needs to be recovered later on.

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2019

Hello @Taranjeet Singh

I'll give it a shot and then i will inform you about the results ;)

Best regards

CM

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2019

Thank you @Taranjeet Singh,

It was a big dig in the db! Thnx for pushing me to the right way :) Great lesson!

Best regards

CM

Like Taranjeet Singh likes this

Suggest an answer

Log in or Sign up to answer