It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problem with Bamboo notifications

Peter J. Kootsookos Sep 27, 2016

I am installing a new version of Bamboo and, after setting up a couple of plans, accidentally deleted the "notifications" table in the MySQL database (don't ask).  I didn't have a back up.

I used the create script here to recreate a blank version of the table.  This seemed to make notifications work again for the pre-existing plans, but now when I add a new plan I get:

org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values (?, ?, ?, ?, ?, ?)]; constraint [RECIPIENT_TYPE_UNIQUE]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch

Followed by:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack' for key 'RECIPIENT_TYPE_UNIQUE'

I just wonder whether the recipient type really needs to be unique?  

Any pointers appreciated!

1 answer

1 accepted

3 votes
Answer accepted
Marcin Gardias Atlassian Team Sep 27, 2016

That CREATE table script is wrong, it creates 4 unique indices instead of one but over multiple columns. Drop them and run:

ALTER TABLE `bamboo`.`NOTIFICATIONS` 
ADD UNIQUE INDEX `notifications_unique` (`RECIPIENT_TYPE` ASC, `RECIPIENT` ASC, `NOTIFICATION_SET` ASC, `CONDITION_DATA` ASC, `CONDITION_KEY` ASC);
Peter J. Kootsookos Sep 28, 2016

Worked like a charm! Thank-you!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar alert! An IT Admin's Guide to Securing Collaboration at Scale

Hello, Atlassian Community! My name is Dave Meyer and I'm a Principal Product Manager at Atlassian. I wanted to give this community a heads up about an upcoming Webinar that might be of interest...

174 views 2 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you