...
Just my blog

Blog about everything, mostly about tech stuff I made. Here is the list of stuff I'm using at my blog. Feel free to ask me about implementations.

Soft I recommend
Py lib I recommend

I'm using these libraries so you can ask me about them.

Can't create plan: Table 'bamboo_db.NOTIFICATIONS' doesn't exist RESOLVED

An issue with clean install Bamboo + MySQL

Can't create plan: Table 'bamboo_db.NOTIFICATIONS' doesn't exist RESOLVED This is log cut:

2015-06-12 15:21:37,985 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-3-thread-8] [JDBCExceptionReporter] Table 'bamboo_db.NOTIFICATIONS' doesn't exist.
2015-06-12 15:21:38,030 ERROR [http-bio-8085-exec-2] [JDBCExceptionReporter] Table 'bamboo_db.NOTIFICATIONS' doesn't exist
2015-06-12 15:21:38,046 ERROR [http-bio-8085-exec-2] [ExceptionMappingInterceptor] org.springframework.dao.InvalidDataAccessResourceUsageException: could not initialize a collection: [com.atlassian.bamboo.notification.NotificationSetImpl.notificationRules#425985]; SQL [select notificati0_.NOTIFICATION_SET as NOTIFICA4_36_1_, notificati0_.NOTIFICATION_RULE_ID as NOTIFICA1_1_, notificati0_.NOTIFICATION_RULE_ID as NOTIFICA1_37_0_, notificati0_.RECIPIENT_TYPE as RECIPIENT2_37_0_, notificati0_.RECIPIENT as RECIPIENT37_0_, notificati0_.NOTIFICATION_SET as NOTIFICA4_37_0_, notificati0_.CONDITION_KEY as CONDITION5_37_0_, notificati0_.CONDITION_DATA as CONDITION6_37_0_ from NOTIFICATIONS notificati0_ where notificati0_.NOTIFICATION_SET=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.atlassian.bamboo.notification.NotificationSetImpl.notificationRules#425985]
Caused by: org.springframework.dao.InvalidDataAccessResourceUsageException: could not initialize a collection: [com.atlassian.bamboo.notification.NotificationSetImpl.notificationRules#425985]; SQL [select notificati0_.NOTIFICATION_SET as NOTIFICA4_36_1_, notificati0_.NOTIFICATION_RULE_ID as NOTIFICA1_1_, notificati0_.NOTIFICATION_RULE_ID as NOTIFICA1_37_0_, notificati0_.RECIPIENT_TYPE as RECIPIENT2_37_0_, notificati0_.RECIPIENT as RECIPIENT37_0_, notificati0_.NOTIFICATION_SET as NOTIFICA4_37_0_, notificati0_.CONDITION_KEY as CONDITION5_37_0_, notificati0_.CONDITION_DATA as CONDITION6_37_0_ from NOTIFICATIONS notificati0_ where notificati0_.NOTIFICATION_SET=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.atlassian.bamboo.notification.NotificationSetImpl.notificationRules#425985]

Too complex log, but all I understand from it - the needed table cannot be created in MySQL. So I'll try to make it manually:

CREATE TABLE `bamboo_db`.`NOTIFICATIONS` (
  `NOTIFICATION_RULE_ID` BIGINT NOT NULL,
  `RECIPIENT_TYPE` VARCHAR(255) NULL,
  `RECIPIENT` VARCHAR(255) NULL,
  `NOTIFICATION_SET` BIGINT NULL,
  `CONDITION_KEY` VARCHAR(255) NULL,
  `CONDITION_DATA` VARCHAR(255) NULL,
  PRIMARY KEY (`NOTIFICATION_RULE_ID`),
  UNIQUE INDEX `RECIPIENT_TYPE_UNIQUE` (`RECIPIENT_TYPE` ASC),
  UNIQUE INDEX `NOTIFICATION_SET_UNIQUE` (`NOTIFICATION_SET` ASC),
  UNIQUE INDEX `CONDITION_KEY_UNIQUE` (`CONDITION_KEY` ASC),
  UNIQUE INDEX `CONDITION_DATA_UNIQUE` (`CONDITION_DATA` ASC));

And it works! UPD: Suggestion from:

BTW: It didn't work: I couldn't add notifications to another build. I asked on the Atlassian forums and they suggested: 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);