Error adding service: com.atlassian.jira.exception

I have tried to install JIRA a couple of times, so I think what has happened is that I didn't clean up a previous installation as well as I should have. I am getting this strange error message during the 'Set Up Application Properties' stage of the initial JIRA configuration.


Error adding service: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ServiceConfig][cronExpression,null][name,Backup Service][time,43200000][id,10002][clazz,] (SQL Exception while executing the following:INSERT INTO public.serviceconfig (ID, delaytime, CLAZZ, servicename, CRON_EXPRESSION) VALUES (?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_serviceconfig" Detail: Key (id)=(10002) already exists.)).



Any idea what is going on and what I can do to fix this?

I am running this on Ubuntu 14.04.3 LTS with a postgresql backend database.

1 answer

1 accepted

You have incorrect sequence value in sequence_value_item table.

Please check it using query:

select seq_id from sequence_value_item where seq_name="ServiceConfig"

If value returned by the query is greater than:

select max(id) from serviceconfig

you need to update seq_id sequence_value_item table for seq_name = "ServiceConfig"

to value greater than second query result.

Do not forget to backup your database before changing your data and please restart JIRA application after you post the changes.


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

800 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you