java.sql.SQLException: ORA-01408: such column list already indexed

Atlassian JIRA | Husein Alatas [Atlassian] | 5 years ago
  1. 0

    (i) Only affecting users with Oracle DB When upgrading Confluence 4.1.x to 4.1.x (e.g. 4.1.0 to 4.1.5). AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask ([CONF-7882]) tries to {{create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID)}}. The upgrade would immediately fail with: {code} 2012-02-15 00:13:09,789 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 4.1.5 (build #3143) 2012-02-15 00:13:13,105 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization started 2012-02-15 00:13:16,840 INFO [main] [com.atlassian.confluence.lifecycle] <init> Loading EhCache cache manager 2012-02-15 00:13:35,159 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization completed in 22054 ms 2012-02-15 00:13:35,230 DEBUG [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized UpgradeLauncherServletContextListener contextInitialized called 2012-02-15 00:14:08,715 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID) 2012-02-15 00:14:08,721 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed 2012-02-15 00:14:08,723 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute could not complete schema update java.sql.SQLException: ORA-01408: such column list already indexed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787) at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280) 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:93) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2012-02-15 00:14:08,772 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:113) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.inATTACHMENTDATA (ATTACHMENTIDvoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:93) ... 16 more Caused by: java.sql.SQLException: ORA-01408: such column list already indexed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787) at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280) 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 2012-02-15 00:14:08,779 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade: 2012-02-15 00:14:08,780 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Cannot update schema 2012-02-15 00:14:08,780 DEBUG [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized UpgradeLauncherServletContextListener contextInitialized completed successfully 2012-02-15 00:14:08,781 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors 2012-02-15 00:14:09,757 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve {code} The error is straight forward. Confluence 4.1.x (Oracle) already has an index {{ATTCH_IDVER_IDX}} on {{ATTACHMENTDATA (ATTACHMENTID, ATTVERSION)}}. !ATTACHMENTDATA_Conf41.png! IMHO, Confluence should drop it first or just skip creating it. This is related to CONF-15228. But I think this is different because {{ATTCH_IDVER_IDX}} was created by Confluence. h5. Workaround # Append the following to your Confluence you're upgrading to [system properties|http://confluence.atlassian.com/display/DOC/Configuring+System+Properties]: {code} -Dhibernate.hbm2ddl.skip_creating_missing_indexes=true {code} This would skip automatic index creation during the upgrade. # Re-run Confluence to trigger the upgrade.

    Atlassian JIRA | 5 years ago | Husein Alatas [Atlassian]
    java.sql.SQLException: ORA-01408: such column list already indexed
  2. 0

    (i) Only affecting users with Oracle DB When upgrading Confluence 4.1.x to 4.1.x (e.g. 4.1.0 to 4.1.5). AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask ([CONF-7882]) tries to {{create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID)}}. The upgrade would immediately fail with: {code} 2012-02-15 00:13:09,789 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 4.1.5 (build #3143) 2012-02-15 00:13:13,105 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization started 2012-02-15 00:13:16,840 INFO [main] [com.atlassian.confluence.lifecycle] <init> Loading EhCache cache manager 2012-02-15 00:13:35,159 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization completed in 22054 ms 2012-02-15 00:13:35,230 DEBUG [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized UpgradeLauncherServletContextListener contextInitialized called 2012-02-15 00:14:08,715 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID) 2012-02-15 00:14:08,721 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed 2012-02-15 00:14:08,723 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute could not complete schema update java.sql.SQLException: ORA-01408: such column list already indexed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787) at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280) 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:93) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2012-02-15 00:14:08,772 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:113) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.inATTACHMENTDATA (ATTACHMENTIDvoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:93) ... 16 more Caused by: java.sql.SQLException: ORA-01408: such column list already indexed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787) at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280) 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 2012-02-15 00:14:08,779 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade: 2012-02-15 00:14:08,780 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Cannot update schema 2012-02-15 00:14:08,780 DEBUG [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized UpgradeLauncherServletContextListener contextInitialized completed successfully 2012-02-15 00:14:08,781 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors 2012-02-15 00:14:09,757 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve {code} The error is straight forward. Confluence 4.1.x (Oracle) already has an index {{ATTCH_IDVER_IDX}} on {{ATTACHMENTDATA (ATTACHMENTID, ATTVERSION)}}. !ATTACHMENTDATA_Conf41.png! IMHO, Confluence should drop it first or just skip creating it. This is related to CONF-15228. But I think this is different because {{ATTCH_IDVER_IDX}} was created by Confluence. h5. Workaround # Append the following to your Confluence you're upgrading to [system properties|http://confluence.atlassian.com/display/DOC/Configuring+System+Properties]: {code} -Dhibernate.hbm2ddl.skip_creating_missing_indexes=true {code} This would skip automatic index creation during the upgrade. # Re-run Confluence to trigger the upgrade.

    Atlassian JIRA | 5 years ago | Husein Alatas [Atlassian]
    java.sql.SQLException: ORA-01408: such column list already indexed
  3. 0

    h3. Summary _Upgrading_ from any older version of Stash or Bitbucket Server 4.0 to Bitbucket Server 4.2+ when running against Oracle causes the application to enter an unstable state. h3. Environment * Any release Stash or Bitbucket Server 4.0 * Running on Oracle database h3. Steps to Reproduce This is caused if running the upgrade according to the upgrade guide: - [Bitbucket Server upgrade guide|https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html] h3. Expected Results Upgrade should finish successfully. h3. Actual Results The below exception is thrown in the {{atlassian-bitbucket.log}} file immediately after the upgrade is completed: {noformat} 2016-01-18 11:50:13,499 INFO [active-objects-init-compatibility-tenant-0] c.a.a.i.ActiveObjectUpgradeManagerImpl Finished upgrading, model is up to date at version 0 2016-01-18 11:50:13,635 ERROR [active-objects-init-compatibility-tenant-0] net.java.ao.sql Exception executing SQL update <CREATE INDEX "index_ao_8e6075_pro1711516542" ON "AO_8E6075_PROJECT_MAPPING"("EXTERNAL_ID")> java.sql.SQLException: ORA-01408: such column list already indexed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at com.zaxxer.hikari.proxy.StatementProxy.executeUpdate(StatementProxy.java:119) ~[HikariCP-2.4.1.jar:na] at com.zaxxer.hikari.proxy.HikariStatementProxy.executeUpdate(HikariStatementProxy.java) ~[HikariCP-2.4.1.jar:na] at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2246) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2302) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2274) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:91) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.EntityManager.migrate(EntityManager.java:128) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:45) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) [sal-core-3.0.5.jar:na] at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:54) [bitbucket-platform-4.2.1.jar:na] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:30) [atlassian-plugins-core-4.0.4.jar:na] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) [sal-core-3.0.5.jar:na] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:72) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:91) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38) [sal-core-3.0.5.jar:na] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] ... 47 frames trimmed {noformat} h3. Notes ActiveObjects has a bug where if entity column getters are annotated with @Indexed and either @PrimaryKey or @Unique under Oracle it will try to create the additional index (for @Indexed) even though Oracle will have already created indexes for the primary key and unique columns when the table is created. Oracle allows only one index per column. This causes the mirroring plugin to fail to start due to errors from Oracle during migration and unfortunately causes the application to enter an unstable state. The logs will report: "java.sql.SQLException: ORA-01408: such column list already indexed" The fix is to remove the redundant @Indexed annotations from the offending classes. h3. Solution Upgrade to Bitbucket Server 4.2.2, Bitbucket Server 4.3.1, or higher.

    Atlassian JIRA | 10 months ago | Michael Studman [Atlassian]
    java.sql.SQLException: ORA-01408: such column list already indexed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Summary _Upgrading_ from any older version of Stash or Bitbucket Server 4.0 to Bitbucket Server 4.2+ when running against Oracle causes the application to enter an unstable state. h3. Environment * Any release Stash or Bitbucket Server 4.0 * Running on Oracle database h3. Steps to Reproduce This is caused if running the upgrade according to the upgrade guide: - [Bitbucket Server upgrade guide|https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html] h3. Expected Results Upgrade should finish successfully. h3. Actual Results The below exception is thrown in the {{atlassian-bitbucket.log}} file immediately after the upgrade is completed: {noformat} 2016-01-18 11:50:13,499 INFO [active-objects-init-compatibility-tenant-0] c.a.a.i.ActiveObjectUpgradeManagerImpl Finished upgrading, model is up to date at version 0 2016-01-18 11:50:13,635 ERROR [active-objects-init-compatibility-tenant-0] net.java.ao.sql Exception executing SQL update <CREATE INDEX "index_ao_8e6075_pro1711516542" ON "AO_8E6075_PROJECT_MAPPING"("EXTERNAL_ID")> java.sql.SQLException: ORA-01408: such column list already indexed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at com.zaxxer.hikari.proxy.StatementProxy.executeUpdate(StatementProxy.java:119) ~[HikariCP-2.4.1.jar:na] at com.zaxxer.hikari.proxy.HikariStatementProxy.executeUpdate(HikariStatementProxy.java) ~[HikariCP-2.4.1.jar:na] at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2246) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2302) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2274) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:91) [activeobjects-plugin-1.1.5.jar:na] at net.java.ao.EntityManager.migrate(EntityManager.java:128) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:45) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) [sal-core-3.0.5.jar:na] at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:54) [bitbucket-platform-4.2.1.jar:na] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:30) [atlassian-plugins-core-4.0.4.jar:na] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) [sal-core-3.0.5.jar:na] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:72) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:91) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86) [activeobjects-plugin-1.1.5.jar:na] at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38) [sal-core-3.0.5.jar:na] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] ... 47 frames trimmed {noformat} h3. Notes ActiveObjects has a bug where if entity column getters are annotated with @Indexed and either @PrimaryKey or @Unique under Oracle it will try to create the additional index (for @Indexed) even though Oracle will have already created indexes for the primary key and unique columns when the table is created. Oracle allows only one index per column. This causes the mirroring plugin to fail to start due to errors from Oracle during migration and unfortunately causes the application to enter an unstable state. The logs will report: "java.sql.SQLException: ORA-01408: such column list already indexed" The fix is to remove the redundant @Indexed annotations from the offending classes. h3. Solution Upgrade to Bitbucket Server 4.2.2, Bitbucket Server 4.3.1, or higher.

    Atlassian JIRA | 10 months ago | Michael Studman [Atlassian]
    java.sql.SQLException: ORA-01408: such column list already indexed
  6. 0

    GitHub comment 12#126733654

    GitHub | 1 year ago | straav
    java.sql.SQLException: ORA-01408: such column list already indexed

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      ORA-01408: such column list already indexed

      at oracle.jdbc.driver.T4CTTIoer.processError()
    2. Oracle jdbc
      OracleStatementWrapper.executeUpdate
      1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
      2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
      4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
      5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
      6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
      7. oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
      8. oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999)
      9. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
      10. oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822)
      11. oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787)
      12. oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280)
      12 frames
    3. c3p0:JDBC DataSources/Resource Pools
      NewProxyStatement.executeUpdate
      1. com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
      1 frame
    4. net.sf.hibernate
      SchemaUpdate.execute
      1. net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:167)
      1 frame
    5. bucket.core.persistence
      SchemaHelper.updateSchemaIfNeeded
      1. bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:161)
      2. bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:134)
      2 frames
    6. com.atlassian.confluence
      UpgradeLauncherServletContextListener.contextInitialized
      1. com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:93)
      2. com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:45)
      2 frames
    7. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
      3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      4. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
      5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
      7. org.apache.catalina.core.StandardService.start(StandardService.java:525)
      8. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
      9. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
      9 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    9. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      2 frames