ORA-01400 Error when deleting an issue

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following appears in the atlassian-jira.log:

Technical details

Log's referral number: 92c3391d-35db-4733-84c2-404ed87ebcad
Cause

Referer URL: https://base-url/browse/ABC-22

com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:Oracle.1.0.1.0

java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("jiradb"."AO_60DB71_ISSUERANKINGLOG"."ID")

    com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
    Database:
    	- name:Oracle
    	- version:Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
    	- minor version:1
    	- major ve	- version:Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
    	- minor version:1
    	- major version:12
    Driver:
    	- name:Oracle JDBC driver
    	- version:12rsion:12
    Driver:
    	- name:Oracle JDBC driver
    	- version:12.1.0.1.0

    java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("jiradb"."AO_60DB71_ISSUERANKINGLOG"."ID")

    	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:107)
    	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.create(DelegatingActiveObjects.java:63)
    	at sun.reflect.GeneratedMethodAccessor2076.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
    	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

...
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("jiradb"."AO_60DB71_ISSUERANKINGLOG"."ID")
    	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
    	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
    	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
    	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)

Cause

In the Oracle database, there are some triggers disabled.

Diagnosis

You can find disabled triggers in the database with the following SQL query run against your JIRA database

select trigger_name, column_name, table_name, table_owner from user_triggers where status = 'DISABLED';

 

Resolution

  1. Run the SQL command below to generate a bunch of alter trigger statements to re-enable disabled triggers:

    select 'alter trigger '||t.TRIGGER_NAME||' enable;' from user_triggers t where t.STATUS='DISABLED'
  2. Run the generated alter trigger queries to re-enable triggers. 
    (info) you might get an error saying some triggers do not exist, in this case you may need to enclose the trigger name in double quotes using this SQL query to generate the statments:

    select 'alter trigger "'||t.TRIGGER_NAME||'" enable;' from user_triggers t where t.STATUS='DISABLED'



Last modified on Dec 5, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.