Upgrading from 5.3.1 to 5.4.1 failed on an Oracle database when trying to create the c_ancestorid_idx on CONFANCESTORS.

      Update
      Upgrading to 5.4.3 will also throw a similar error, when trying to create the c_extentityid_idx on external_members.

      Workaround
      Follow the instruction at this KB to resolve the issue

            [CONFSERVER-32139] Upgrade task fails with Oracle during index creation

            Hi Everyone

            Thanks for taking the time to raise, comment and vote on this issue. Because we are unable to track the indexes that you may (or may not) have created, and because we do not want to delete those indexes it's not really possible for us to automate a fix for this problem.

            We've published the following Knowledge Base article on this issue with steps to remedy the problem:

            https://confluence.atlassian.com/display/CONFKB/Confluence+upgrade+ORA-01408%3A+such+column+list+already+indexed

            I'm also going to resolve this issue as Answered.

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi Everyone Thanks for taking the time to raise, comment and vote on this issue. Because we are unable to track the indexes that you may (or may not) have created, and because we do not want to delete those indexes it's not really possible for us to automate a fix for this problem. We've published the following Knowledge Base article on this issue with steps to remedy the problem: https://confluence.atlassian.com/display/CONFKB/Confluence+upgrade+ORA-01408%3A+such+column+list+already+indexed I'm also going to resolve this issue as Answered. Regards Steve Haffenden Confluence Bugmaster Atlassian

            Zacharie Eakin added a comment - - edited

            I also suffered this issue, and found the reason was due to some indexes we had created to help improve performance (irony!). Atlassian were the ones who recommended we implement these indexes in the first place, which leads me to believe it very possible others might have also been recommended the same causing this issue.

            We were able to get around the errors by removing the problem indexes one by one, for us they were named as follows:
            bad indexes:
            FK2_CONFANCESTORS
            FK_CONTENTPROPERTIES
            FK_EXTERNAL_MEMBERS
            FK_LOCAL_MEMBERS
            FK_TRUSTED_APP_REST
            FK_OS_USER_GROUP

            I may have missed one or two and your indexes may or may not be named differently.

            Zacharie Eakin added a comment - - edited I also suffered this issue, and found the reason was due to some indexes we had created to help improve performance (irony!). Atlassian were the ones who recommended we implement these indexes in the first place, which leads me to believe it very possible others might have also been recommended the same causing this issue. We were able to get around the errors by removing the problem indexes one by one, for us they were named as follows: bad indexes: FK2_CONFANCESTORS FK_CONTENTPROPERTIES FK_EXTERNAL_MEMBERS FK_LOCAL_MEMBERS FK_TRUSTED_APP_REST FK_OS_USER_GROUP I may have missed one or two and your indexes may or may not be named differently.

            IT Admin added a comment - - edited

            Happened here when updating from 5.2.5 to 5.4.4 on MySQL.

            2014-07-18 12:34:19,269 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization completed in 10236 ms
            2014-07-18 12:34:20,621 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index c_extentityid_idx on external_members (extentityid)
            2014-07-18 12:34:20,621 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Duplicate index 'c_extentityid_idx' defined on the table 'db_confluence.external_members'. This is deprecated and will be disallowed in a future release.
            2014-07-18 12:34:20,622 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute could not complete schema update
            java.sql.SQLException: Duplicate index 'c_extentityid_idx' defined on the table 'db_confluence.external_members'. This is deprecated and will be disallowed in a future release.
            	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072)
            	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:2687)
            	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647)
            	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566)
            	at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
            	at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:167)
            	at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:161)
            	at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:134)
            	at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:154)
            	at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:50)
            	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
            	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
            	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
            	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
            	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
            	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:606)
            	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
            	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
            2014-07-18 12:34:20,633 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: com.atlassian.config.ConfigurationException: Cannot update schema
            com.atlassian.confluence.upgrade.UpgradeException: com.atlassian.config.ConfigurationException: Cannot update schema
            	at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:174)
            	at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:50)
            	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
            	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
            	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
            	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
            	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
            	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:606)
            	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
            	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
            Caused by: com.atlassian.config.ConfigurationException: Cannot update schema
            	at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:165)
            	at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:134)
            	at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:154)
            	... 16 more
            Caused by: java.sql.SQLException: Duplicate index 'c_extentityid_idx' defined on the table 'db_confluence.external_members'. This is deprecated and will be disallowed in a future release.
            	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072)
            	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:2687)
            	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647)
            	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566)
            	at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
            	at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:167)
            	at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:161)
            	... 18 more
            2014-07-18 12:34:20,637 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade:
            2014-07-18 12:34:20,637 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Cannot update schema
            2014-07-18 12:34:20,637 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors
            2014-07-18 12:34:21,081 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve
            2014-07-18 12:35:28,722 INFO [Thread-41] [atlassian.plugin.manager.DefaultPluginManager] shutdown Shutting down the plugin system
            2014-07-18 12:35:28,745 INFO [Thread-41] [com.atlassian.confluence.lifecycle] destroy Shutting down long running task service
            2014-07-18 12:35:29,225 INFO [Thread-41] [com.atlassian.confluence.lifecycle] contextDestroyed Stopping Confluence
            

            IT Admin added a comment - - edited Happened here when updating from 5.2.5 to 5.4.4 on MySQL. 2014-07-18 12:34:19,269 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization completed in 10236 ms 2014-07-18 12:34:20,621 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index c_extentityid_idx on external_members (extentityid) 2014-07-18 12:34:20,621 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Duplicate index 'c_extentityid_idx' defined on the table 'db_confluence.external_members'. This is deprecated and will be disallowed in a future release. 2014-07-18 12:34:20,622 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute could not complete schema update java.sql.SQLException: Duplicate index 'c_extentityid_idx' defined on the table 'db_confluence.external_members'. This is deprecated and will be disallowed in a future release. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072) 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:2687) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64) at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:167) at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:161) at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:134) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:154) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:50) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) 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:606) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2014-07-18 12:34:20,633 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: com.atlassian.config.ConfigurationException: Cannot update schema com.atlassian.confluence.upgrade.UpgradeException: com.atlassian.config.ConfigurationException: Cannot update schema at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:174) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:50) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) 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:606) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: com.atlassian.config.ConfigurationException: Cannot update schema at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:165) at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:134) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:154) ... 16 more Caused by: java.sql.SQLException: Duplicate index 'c_extentityid_idx' defined on the table 'db_confluence.external_members'. This is deprecated and will be disallowed in a future release. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072) 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:2687) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64) at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:167) at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:161) ... 18 more 2014-07-18 12:34:20,637 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade: 2014-07-18 12:34:20,637 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Cannot update schema 2014-07-18 12:34:20,637 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors 2014-07-18 12:34:21,081 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve 2014-07-18 12:35:28,722 INFO [Thread-41] [atlassian.plugin.manager.DefaultPluginManager] shutdown Shutting down the plugin system 2014-07-18 12:35:28,745 INFO [Thread-41] [com.atlassian.confluence.lifecycle] destroy Shutting down long running task service 2014-07-18 12:35:29,225 INFO [Thread-41] [com.atlassian.confluence.lifecycle] contextDestroyed Stopping Confluence

            Here is a copy of the startup log during the error.

            Philippe Busque added a comment - Here is a copy of the startup log during the error.

              tquanghua Thinh Quang Hua (Inactive)
              btom1 Brian
              Affected customers:
              3 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: