ORA-02296: cannot enable database - null values found

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

After migrating to or copying an Oracle based database, actions in Jira fail with interface errors such as:

(Auto-migrated image: description temporarily unavailable)

Jira logs will throw an ORA-02296 error related to null values found:

1 02296: cannot enable (JIRAGREEN.) - null values found

Cause

The full error indicates that Oracle identified a NULL value in a place where there shouldn't be NULL values. The error message will also report the query that was being executed prior to the error, such as:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Caused by: Error : 2296, Position : 0, Sql = ALTER TABLE "AO_4789DD_HEALTH_CHECK_STATUS" MODIFY ("ID" NOT NULL), OriginalSql = ALTER TABLE "AO_4789DD_HEALTH_CHECK_STATUS" MODIFY ("ID" NOT NULL), Error Msg = ORA-02296: cannot enable (JIRAGREEN.) - null values found ... Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library: Database: - name:Oracle - version:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.10.0.0.0 - minor version:0 Driver: - name:Oracle JDBC driver - version:19.3.0.0.0 java.sql.SQLIntegrityConstraintViolationException: ORA-02296: cannot enable (JIRAGREEN.) - null values found at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:54) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.lambda$create$0(AbstractActiveObjectsFactory.java:73) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:50) ... 2 filtered

In this case, the column reported was "ID" of the table "AO_4789DD_HEALTH_CHECK_STATUS".

Solution

We'll need to compare both source and target tables to check for structural differences on the affected table/column. For example, a DESC AO_4789DD_HEALTH_CHECK_STATUS will show that the "ID" column was configured differently on source and target:

  • Source: ID NOT NULL NUMBER(11)

  • Target: ID NUMBER(11)

For the involved tables, we'll need to manually check if there are major dataset differences that might require a re-importing. If not, we can just remove invalid records and modify the table structure accordingly:

1 DELETE FROM "AO_4789DD_HEALTH_CHECK_STATUS" WHERE "ID" IS NULL;
1 ALTER TABLE "AO_4789DD_HEALTH_CHECK_STATUS" MODIFY ( "ID" NOT NULL);

⚠️ Be sure to backup your database prior to making any direct changes such as these, as well as testing them in a lower environment in order to avoid any additional issues.

⚠️ These need to be performed while Jira is shut down.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.