Installing add-on fails with ORA-01400: cannot insert NULL into AO_6384AB_FEATURE_METADATA_AO
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
The app fails to install via UPM.
The following appears in the atlassian-confluence.log
2016-04-12 13:02:50,389 ERROR [UpmAsynchronousTaskManager:thread-1] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.plugin.event.events.PluginModuleEnabledEvent for com.comalatech.workflow:overview (null)] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@3cc9928d]
-- url: /rest/plugins/1.0/ | referer: http://confluence.example.com/plugins/servlet/upm | userName: jiraadmin
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
- name:Oracle
- version:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
- minor version:1
- major version:12
Driver:
- name:Oracle JDBC driver
- version:12.1.0.2.0
java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("CONFLUENCE"."AO_6384AB_FEATURE_METADATA_AO"."ID")
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)Environment
Oracle database
Diagnosis
Check the sequences of the database user
Compare the last number for the 'AO_6384AB_FEATURE_M675681913' sequence with the latest ID of the 'AO_6384AB_FEATURE_METADATA_AO' table
Cause
The sequence is out of sync with the latest ID in the 'AO_6384AB_FEATURE' table.
Solution
Workaround
The sequence and table can be dropped and recreated to get back in sync.
Warning: Backup your database before proceeding.
This article describes how to run SQL UPDATE statements directly against the Confluence database to replace hard-coded links. UPDATE statements are not reversible — any mistake will modify your live data permanently. Before running any SQL in this article, create a full backup of your Confluence database. Test the queries in a staging environment first if possible.
Stop Confluence
Back up the database.
Drop Sequence AO_6384AB_FEATURE_M675681913 and table
DROP SEQUENCE AO_6384AB_FEATURE_M675681913; DROP TABLE AO_6384AB_FEATURE_METADATA_AO;Start Confluence
Install add-on.
Was this helpful?