Unable to delete empty Insight object scheme, Something went wrong, contact adminstrator

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Trying to delete empty object schemes will take some time to respond and eventually fail with an internal server error "Something went wrong, contact adminstrator"

Diagnosis

Reviewing the atlassian-jira.log, the following stack trace can be found after trying to delete the object scheme:

2022-04-18 14:33:35,577-0500 https-jsse-nio-8443-exec-36 url: /jira/rest/insight/1.0/objectschema/281; user: admin ERROR admin 873x11260x1 1abcwco xxxx.xxxx.xxxx.xxxx,xxxx.xxxx.xxxx.xxxx /rest/insight/1.0/objectschema/281 [c.r.j.p.i.services.core.ObjectTypeServiceImpl] RuntimeException: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.14.0.0.0
    	- minor version:0
    	- major version:19
    Driver:
    	- name:Oracle JDBC driver
    	- version:19.3.0.0.0
    
    java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (JIRA.fk_ao_8542f1_ifj_ob1647552180) violated - child record found
    
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.14.0.0.0
	- minor version:0
	- major version:19
Driver:
	- name:Oracle JDBC driver
	- version:19.3.0.0.0
java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (JIRA.fk_ao_8542f1_ifj_ob1647552180) violated - child record found
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.delete(EntityManagedActiveObjects.java:120)
	at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.delete(TenantAwareActiveObjects.java:282)
	... 2 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy2681.delete(Unknown Source)
	at com.riadalabs.jira.plugins.insight.services.core.dal.dao.impl.InsightActiveObject.delete(InsightActiveObject.java:78)
	at com.riadalabs.jira.plugins.insight.services.core.dal.dao.impl.ObjectTypeDaoImpl.deleteObjectTypeAO(ObjectTypeDaoImpl.java:139)
	at com.riadalabs.jira.plugins.insight.services.core.dal.impl.ConfigurationDalImpl.deleteObjectType(ConfigurationDalImpl.java:689)
	at com.riadalabs.jira.plugins.insight.services.core.ObjectTypeServiceImpl.deleteObjectType(ObjectTypeServiceImpl.java:546)
	at com.riadalabs.jira.plugins.insight.services.core.ObjectTypeDeletionServiceImpl.deleteObjectType(ObjectTypeDeletionServiceImpl.java:47)
	at com.riadalabs.jira.plugins.insight.services.core.ObjectSchemaDeletionServiceImpl.deleteObjectSchema(ObjectSchemaDeletionServiceImpl.java:42)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.objectschema.ObjectSchemaResource.deleteObjectSchema(ObjectSchemaResource.java:359)
	... 3 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	... 19 filtered
	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:160)
	... 1 filtered
	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:70)
	... 32 filtered
	at com.intenso.jira.plugins.it.transform.CleanupFilter.doFilter(CleanupFilter.java:21)
	... 3 filtered
	at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55)
	... 8 filtered
	at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59)
	... 4 filtered
	at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54)
	... 3 filtered
	at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55)
	... 8 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 43 filtered
	at com.atlassian.ratelimiting.internal.filter.RateLimitFilter.doFilter(RateLimitFilter.java:73)
	... 3 filtered
	at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
	... 17 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
	... 1 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
	... 16 filtered
	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:38)
	... 19 filtered
	at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
	... 5 filtered
	at com.valiantys.jira.plugins.sql.service.servletcontext.ContextListenerServletFilter.doFilter(ContextListenerServletFilter.java:24)
	... 3 filtered
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:215)
	at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136)
	at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89)
	at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:206)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:134)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:123)
	... 9 filtered
	at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
	... 3 filtered
	at com.atlassian.ratelimiting.internal.filter.RateLimitPreAuthFilter.doFilter(RateLimitPreAuthFilter.java:71)
	... 3 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 4 filtered
	at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
	... 3 filtered
	at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
	... 26 filtered
	at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
	... 25 filtered
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (JIRA.fk_ao_8542f1_ifj_ob1647552180) violated - child record found

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1205)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)
	at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426)
	at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3756)
	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3736)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1063)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
	at com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:47)
	at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.lambda$executeUpdate$7(DiagnosticPreparedStatement.java:69)
	at com.atlassian.diagnostics.internal.platform.monitor.db.DefaultDatabaseDiagnosticsCollector.recordExecutionTime(DefaultDatabaseDiagnosticsCollector.java:70)
	at com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.recordExecutionTime(DatabaseDiagnosticsCollectorDelegate.java:55)
	at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.executeUpdate(DiagnosticPreparedStatement.java:69)
	at net.java.ao.ForwardingPreparedStatement.executeUpdate(ForwardingPreparedStatement.java:45)
	at net.java.ao.ParameterMetadataCachingPreparedStatement.executeUpdate(ParameterMetadataCachingPreparedStatement.java:10)
	at net.java.ao.EntityManager.delete(EntityManager.java:541)
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.delete(EntityManagedActiveObjects.java:118)
	... 322 more
Caused by: Error : 2292, Position : 0, Sql = DELETE FROM "AO_8542F1_IFJ_OBJ_TYPE" WHERE "ID" IN (:1 ), OriginalSql = DELETE FROM "AO_8542F1_IFJ_OBJ_TYPE" WHERE "ID" IN (?), Error Msg = ORA-02292: integrity constraint (JIRA.fk_ao_8542f1_ifj_ob1647552180) violated - child record found

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513)
	... 347 more


Cause

The specific Caused by: Error : 2292, Position : 0, Sql = DELETE FROM "AO_8542F1_IFJ_OBJ_TYPE" WHERE "ID" IN (:1 ), OriginalSql = DELETE FROM "AO_8542F1_IFJ_OBJ_TYPE" WHERE "ID" IN (?), Error Msg = ORA-02292: integrity constraint (JIRA.fk_ao_8542f1_ifj_ob1647552180) violated - child record found Indicates that there is a orphaned child entity within the Object Scheme, in most cases an object or attribute that for some reason was not deleted from the database.

Solution

In order to resolve this issue and be able to delete the Object Scheme, we have to query the database searching for Null entries that can indicate orphaned objects.

  1. Take note of the specific Object Scheme that is throwing the exception: /jira/rest/insight/1.0/objectschema/281 In this example, ID 281
  2. Run the following SQL queries to identify orphaned entities:

    SELECT * FROM AO_8542F1_IFJ_OBJ WHERE ID IS NULL;
    SELECT * FROM AO_8542F1_IFJ_OBJ_ATTR WHERE OBJECT_ID IS NULL;
    SELECT * FROM AO_8542F1_IFJ_OBJ_ATTR_VAL WHERE OBJECT_ATTRIBUTE_ID IS NULL;
    SELECT * FROM "AO_8542F1_IFJ_OBJ" WHERE "OBJECT_TYPE_ID" IN (SELECT "ID" FROM "AO_8542F1_IFJ_OBJ_TYPE" WHERE "OBJECT_SCHEMA_ID" = '281')

    (info) The SQL queries will be looking for orphaned objects with NULL object schemes, and the last query is looking for existing objects tied to the object scheme 281 that are not showing in the UI, hence, preventing the scheme deletion.

  3. Take note of the "ID" column of any retrieved output from those queries;

  4. Delete any entries retrieved in the SQL output:
    (warning) Make sure to backup the database before proceeding with the deletes

    delete from "AO_8542F1_IFJ_OBJ_ATTR_VAL" where id in ('xxxx', 'xxxxx', 'xxxxx')
    delete from "AO_8542F1_IFJ_OBJ" where "ID" in ('xxxx', 'xxxxx', 'xxxxxx', 'xxxxx')
  5. Restart Jira;
  6. Perform an Insight Reindex;
  7. Try to delete the Object Scheme again.





Last modified on Apr 27, 2022

Was this helpful?

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