Startup SQL errors when creating Active Objects schema for Automation for Jira
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
During Jira startup, Automation for Jira (as all apps and plugins) validate it's own Active Objects tables and try to alter them if needed.
For some databases this may fail and has to be updated manually. The errors may allow Jira and Automation to startup and work, but they won't be functioning optimally if the schema's not what the app expects.
Environment
Any Server or Data Center version of Jira Software or Jira Service Management, with Automation for Jira installed or bundled within the product.
Diagnosis
Th following warning shows up during Jira startup on the atlassian-jira.log:
1
WARN anonymous [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.atlassian.jira.plugin.automation.for-jira] failed to create ActiveObjects
On MS SQL Server, for example, the error suggests which object prevented the schema update and why:
1
2
2023-01-10 19:30:40,365 active-objects-init-JiraTenantImpl{id='system'}-0 ERROR anonymous [n.java.ao.sql] Exception executing SQL update <ALTER TABLE dbo.AO_589059_AUTOMATION_QUEUE ALTER COLUMN PRIORITY BIGINT NOT NULL>
com.microsoft.sqlserver.jdbc.SQLServerException: The object 'df_AO_589059_AUTOMATION_QUEUE_PRIORITY' is dependent on column 'PRIORITY'.
The possible list of blocking objects includes, but is not limited to:
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
28
29
30
31
32
33
34
35
36
37
38
fk_ao_589059_automation_queue_audit_item_id
fk_ao_589059_audit_item_project_audit_item_id
fk_ao_589059_audit_item_comp_cge_audit_item_id
fk_ao_589059_audit_item_cge_item_audit_item_id
fk_ao_589059_audit_item_asc_item_audit_item_id
pk_AO_589059_AUDIT_ITEM_ID
pk_AO_589059_AUDIT_ITEM_ASC_ITEM_ID
pk_AO_589059_AUDIT_ITEM_CGE_ITEM_ID
fk_ao_589059_audit_item_cge_item_audit_item_component_change_id
fk_ao_589059_audit_item_asc_item_audit_item_component_change_id
pk_AO_589059_AUDIT_ITEM_COMP_CGE_ID
pk_AO_589059_AUDIT_ITEM_PROJECT_ID
pk_AO_589059_AUTOMATION_QUEUE_ID
df_AO_589059_AUTOMATION_QUEUE_PRIORITY
pk_AO_589059_COUNTERS_ID
pk_AO_589059_LEGACY_RULE_LINK_ID
df_AO_589059_LEGACY_RULE_LINK_LEGACY_ID
df_AO_589059_LEGACY_RULE_LINK_NEW_ID
fk_ao_589059_rule_cfg_component_parent_cfg_component_id
fk_ao_589059_rule_cfg_component_condition_parent_id
pk_AO_589059_RULE_CFG_COMPONENT_ID
pk_AO_589059_RULE_CFG_PROJ_ASSOC_ID
fk_ao_589059_rule_to_label_rule_id
fk_ao_589059_rule_tag_rule_config_id
fk_ao_589059_rule_schedule_rule_config_id
fk_ao_589059_rule_cfg_proj_assoc_rule_config_id
fk_ao_589059_rule_cfg_component_rule_config_id
pk_AO_589059_RULE_CONFIG_ID
fk_ao_589059_rule_to_label_label_id
pk_AO_589059_RULE_LABEL_ID
pk_AO_589059_RULE_SCHEDULE_ID
pk_AO_589059_RULE_STAT_ID
pk_AO_589059_RULE_STAT_ROLLUP_DAY_ID
pk_AO_589059_RULE_STAT_ROLLUP_HR_ID
pk_AO_589059_RULE_STAT_ROLLUP_MIN_ID
pk_AO_589059_RULE_STATE_LATEST_ID
pk_AO_589059_RULE_TAG_ID
pk_AO_589059_RULE_TO_LABEL_ID
Cause
The Active Objects implementation in Jira doesn't support dropping indexes, constraints or keys in MySQL and MS SQL Server, thus such changes need to be done directly on the database.
Solution
The scripts available for download at Upgrading to Automation for Jira 7.3 or later contain the AO schema changes with the corresponding drop and add directives.
Stop Jira (on all nodes if Data Center)
Backup the database
Run the corresponding script (MySQL or SQL Server)
Start Jira (one node at a time if Data Center)
Was this helpful?