Oracle upgrade error to 6.8.2
Asked by leo liang:

Hi there,

We attempt to upgrade Confluence on a production replication date set and encountered an can not upgrade schema error.

```
2018-05-07 20:17:55,739 ERROR [localhost-startStop-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 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:157)
 at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:125)
 at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:85)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4884)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5347)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: com.atlassian.config.ConfigurationException: Cannot update schema
 at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:190)
 at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:164)
 at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:141)
 ... 11 more
Caused by: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
 at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
 at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateSchemaManagementTool.createGeneratorTable(ConfluenceHibernateSchemaManagementTool.java:190)
 at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateSchemaManagementTool.access$100(ConfluenceHibernateSchemaManagementTool.java:48)
 at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateSchemaManagementTool$3.performTablesMigration(ConfluenceHibernateSchemaManagementTool.java:127)
 at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:203)
 at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110)
 at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:87)
 at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:58)
 at bucket.core.persistence.hibernate.schema.SchemaHelper.updateSchemaIfNeeded(SchemaHelper.java:188)
 ... 13 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
 at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
 at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
 at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
 at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
 at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213)
 at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37)
 at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896)
 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
 at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1737)
 at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1692)
 at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300)
 at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75)
 at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
 ... 21 more
Caused by: Error : 955, Position : 13, Sql = create table hibernate_unique_key ( next_hi number(10,0) ), OriginalSql = create table hibernate_unique_key ( next_hi number(10,0) ), Error Msg = ORA-00955: name is already used by an existing object

 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
 ... 35 more
2018-05-07 20:17:55,745 ERROR [localhost-startStop-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 1 errors were encountered during upgrade:
2018-05-07 20:17:55,745 ERROR [localhost-startStop-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 1: Cannot update schema
2018-05-07 20:17:55,749 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] lateStartup Plugin system lateStartup begun
2018-05-07 20:17:57,220 WARN [ThreadPoolAsyncTaskExecutor::Thread 24] [client.eventfilter.whitelist.AnalyticsWhitelistModuleDescriptor] readPluginWhitelist No whitelist resource file found at [mediaviewer/lib/analytics-whitelist.json] in plugin [com.atlassian.confluence.plugins.confluence-previews] (bundle entry not found)

```

Then attempted to remove this table and the upgrade **passed**.

Also noticed there are errors on trying to create the AO table after the upgrade.

eg:

```
2018-05-07 20:18:05,832 ERROR [active-objects-init-system tenant-0] [net.java.ao.sql] handleUpdateError Exception executing SQL update <CREATE TABLE "AO_950DC3_TC_SUBCALS" (
 "COLOUR" VARCHAR(255),
 "CREATED" NUMBER(20) DEFAULT 0,
 "CREATOR" VARCHAR(255),
 "DESCRIPTION" CLOB,
 "ID" VARCHAR(255) NOT NULL,
 "LAST_MODIFIED" NUMBER(20) DEFAULT 0,
 "NAME" CLOB NOT NULL,
 "PARENT_ID" VARCHAR(255),
 "SPACE_KEY" VARCHAR(255),
 "STORE_KEY" VARCHAR(255) NOT NULL,
 "SUBSCRIPTION_ID" VARCHAR(255),
 "TIME_ZONE_ID" VARCHAR(255),
 "USING_CUSTOM_EVENT_TYPE_ID" VARCHAR(255),
 CONSTRAINT "fk_ao_950dc3_tc_sub686168731" FOREIGN KEY ("SUBSCRIPTION_ID") REFERENCES "AO_950DC3_TC_SUBCALS"("ID"),
 CONSTRAINT "fk_ao_950dc3_tc_sub193155694" FOREIGN KEY ("PARENT_ID") REFERENCES "AO_950DC3_TC_SUBCALS"("ID"),
 PRIMARY KEY("ID")
)>
java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
```

Please advise.

Thanks,

Leo


Answers:
author: Hassan Aftab
body: Hi Leo!

From the logs it looks like you are running into the following issue.

* [ORA-00955: Name is Already Used by an Existing Object](https://confluence.atlassian.com/confkb/ora-00955-name-is-already-used-by-an-existing-object-317949251.html)

Can you try some of the resolutions suggested in this article to see, if you are able to resolve this error.

Regards, Hassan


Tags: confluence-server

server