Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-38659

Failed to update the platform to Confluence 5.8.5

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Support Request
    • Affects Version/s: 5.5.6, 5.8.5
    • Fix Version/s: None
    • Component/s: None

      Description

      We are trying to update our platform Confluence v5.5.6 to the 5.8.5
      We have error:
      2015-07-15 17:36:01,891 ERROR [localhost-startStop-1] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.attachmentceo.AttachmentToCeoConversionUpgradeTask@5e822356 failed during the SCHEMA_UPGRADE phase due to: PreparedStatementCallback; SQL [insert into ATTACHMENTS(ATTACHMENTID, TITLE, CONTENTTYPE, PAGEID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, FILESIZE, MINOR_EDIT, ATTACHMENT_COMMENT, ATTVERSION, PREVVER)select ? as ATTACHMENTID, TITLE, CONTENTTYPE, PAGEID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, FILESIZE, MINOR_EDIT, ATTACHMENT_COMMENT, ATTVERSION, PREVVER from ATTACHMENTS where ATTACHMENTID = ?]; Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))
      com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.attachmentceo.AttachmentToCeoConversionUpgradeTask@5e822356 failed during the SCHEMA_UPGRADE phase due to: PreparedStatementCallback; SQL [insert into ATTACHMENTS(ATTACHMENTID, TITLE, CONTENTTYPE, PAGEID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, FILESIZE, MINOR_EDIT, ATTACHMENT_COMMENT, ATTVERSION, PREVVER)select ? as ATTACHMENTID, TITLE, CONTENTTYPE, PAGEID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, FILESIZE, MINOR_EDIT, ATTACHMENT_COMMENT, ATTVERSION, PREVVER from ATTACHMENTS where ATTACHMENTID = ?]; Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))
      at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:273)
      at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:217)
      at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:169)
      at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:51)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into ATTACHMENTS(ATTACHMENTID, TITLE, CONTENTTYPE, PAGEID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, FILESIZE, MINOR_EDIT, ATTACHMENT_COMMENT, ATTVERSION, PREVVER)select ? as ATTACHMENTID, TITLE, CONTENTTYPE, PAGEID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, FILESIZE, MINOR_EDIT, ATTACHMENT_COMMENT, ATTVERSION, PREVVER from ATTACHMENTS where ATTACHMENTID = ?]; Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))
      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:858)
      at com.atlassian.confluence.upgrade.upgradetask.attachmentceo.AttachmentIdClashResolver.cloneAttachmentWithNewId(AttachmentIdClashResolver.java:221)
      at com.atlassian.confluence.upgrade.upgradetask.attachmentceo.AttachmentIdClashResolver.remapAttachmentIds(AttachmentIdClashResolver.java:157)
      at com.atlassian.confluence.upgrade.upgradetask.attachmentceo.AttachmentIdClashResolver.resolveAttachmentIdClashes(AttachmentIdClashResolver.java:113)
      at com.atlassian.confluence.upgrade.upgradetask.attachmentceo.AttachmentToCeoConversionUpgradeTask.doUpgrade(AttachmentToCeoConversionUpgradeTask.java:118)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.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.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 com.sun.proxy.$Proxy29.doUpgrade(Unknown Source)
      at com.atlassian.confluence.upgrade.AbstractUpgradeManager$UpgradeStep$3.execute(AbstractUpgradeManager.java:761)
      at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeTask(AbstractUpgradeManager.java:293)
      at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:264)
      ... 12 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`bassdb`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
      at com.mysql.jdbc.Util.getInstance(Util.java:381)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2395)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2313)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2298)
      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)
      ... 33 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sergei.zastrozhnov Sergei ZH
              Participants:
              Last Touched By:
              Katherine Yabut
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last commented:
                2 years, 19 weeks, 2 days ago