integrity constraint violated - child record found during confluence version upgrade from 3.3.3 to 4.1.3

I am trying to upgrade the confluence version from 3.3.3 to 4.1.3.During the upgrade process i am getting this following error

{code}

2012-10-05 01:13:05,826 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@479401b1 failed during the SCHEMA_UPGRADE phase due to: PreparedStatementCallback; SQL [DELETE FROM CONTENT_PERM_SET WHERE ID = ?]; ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

; nested exception is java.sql.SQLException: ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@479401b1 failed during the SCHEMA_UPGRADE phase due to: PreparedStatementCallback; SQL [DELETE FROM CONTENT_PERM_SET WHERE ID = ?]; ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

; nested exception is java.sql.SQLException: ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:251)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:176)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:128)

at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:45)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:616)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [DELETE FROM CONTENT_PERM_SET WHERE ID = ?]; ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

; nested exception is java.sql.SQLException: ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228)

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)

at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)

at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)

at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:854)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsCleaner$2.processRow(ContentPermissionConstraintsCleaner.java:166)

at org.springframework.jdbc.core.JdbcTemplate$RowCallbackHandlerResultSetExtractor.extractData(JdbcTemplate.java:1368)

at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:448)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)

at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)

at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:462)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsCleaner.removeDuplicateContentPermissionSetEntries(ContentPermissionConstraintsCleaner.java:177)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsCleaner.cleanUp(ContentPermissionConstraintsCleaner.java:70)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsCleaner$$FastClassByCGLIB$$42f4de60.invoke(<generated>)

at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)

at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsCleaner$$EnhancerByCGLIB$$6cf5be06.cleanUp(<generated>)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doPreUpgradeCleanup(ContentPermissionConstraintsUpgradeTask.java:178)

at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:114)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:616)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at $Proxy18.doUpgrade(Unknown Source)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager$UpgradeStep$3.execute(AbstractUpgradeManager.java:518)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:227)

... 18 more

Caused by: java.sql.SQLException: ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)

at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)

at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)

at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)

at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)

at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)

at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:798)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)

... 52 more

2012-10-05 01:13:05,832 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade:

2012-10-05 01:13:05,832 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: PreparedStatementCallback; SQL [DELETE FROM CONTENT_PERM_SET WHERE ID = ?]; ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

; nested exception is java.sql.SQLException: ORA-02292: integrity constraint (CONFLUENCE4.FKBD74B31676E33274) violated - child record found

2012-10-05 01:13:05,832 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors

2012-10-05 01:13:06,612 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve

{code}

What could be the reason for this exception.

2 answers

1 accepted

We recommend to upgrade to 3.5.17 first where most bugs are fixed, so I suggest to upgrade first to this version and then to 4.1.3 avoid issues.

Hi, did you do this on a test server? I would suggest that you have backups etc ready before an upgrade and that it is fully tested.

The error appears to be that you are missing SQL scripts for the database.

Refer to https://confluence.atlassian.com/display/DOC/Confluence+4.1+Upgrade+Notes for more information, but since you are on 3.3.3 you should first upgrade to 3.5.x before going to 4.1.3. This should fix a lot of your problems and make your life easier.

Remember when doing an upgrade to go through all the upgrade notes and notes for any previous version(s) as suggested by the upgrade notes.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in New to Confluence

How to use Confluence Cloud for stakeholder management

Most of us don’t need much convincing that stakeholder management is important. It just makes sense that keeping everyone in-the-know on projects and assigning clearly defined roles is key to having ...

1,168 views 4 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you