Upgrade to 4.3 fails - Bad SQL grammar [create index like_cid_idx on LIKES (CONTENTID)], due to ORA-00955: name is already used by an existing object

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

The upgrade to 4.3 (and minor versions up to 4.3.4) fails.

atlassian-confluence.log に次のメッセージが表示される。

2013-03-19 09:47:57,161 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LikesSqlConstraintsUpgradeTask@e105a2 failed during the UPGRADE phase due to: StatementCallback; bad SQL grammar [create index like_cid_idx on LIKES (CONTENTID)]; nested exception is java.sql.SQLException: ORA-00955: name is already used by an existing object

com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LikesSqlConstraintsUpgradeTask@e105a2 failed during the UPGRADE phase due to: StatementCallback; bad SQL grammar [create index like_cid_idx on LIKES (CONTENTID)]; nested exception is java.sql.SQLException: ORA-00955: name is already used by an existing object

        at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:251)
        at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runUpgradeTasks(AbstractUpgradeManager.java:187)
        at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:132)
        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)
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [create index like_cid_idx on LIKES (CONTENTID)]; nested exception is java.sql.SQLException: ORA-00955: name is already used by an existing object

        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:429)
        at com.atlassian.confluence.upgrade.ddl.HibernateDdlExecutor.executeDdlStatements(HibernateDdlExecutor.java:66)
        at com.atlassian.confluence.upgrade.ddl.HibernateDdlExecutor.executeDdl(HibernateDdlExecutor.java:55)
        at com.atlassian.confluence.upgrade.upgradetask.LikesSqlConstraintsUpgradeTask.doUpgrade(LikesSqlConstraintsUpgradeTask.java:61)
        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.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 $Proxy47.doUpgrade(Unknown Source)
        at com.atlassian.confluence.upgrade.AbstractUpgradeManager$UpgradeStep$4.execute(AbstractUpgradeManager.java:531)
        at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:227)
        ... 18 more
Caused by: java.sql.SQLException: ORA-00955: name is already used by an existing object

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
        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.T4CStatement.doOall8(T4CStatement.java:207)
        at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1111)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1278)
        at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1950)
        at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1916)
        at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006)
        at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:422)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
        ... 35 more
2013-03-19 09:47:57,175 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade:
2013-03-19 09:47:57,176 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: StatementCallback; bad SQL grammar [create index like_cid_idx on LIKES (CONTENTID)]; nested exception is java.sql.SQLException: ORA-00955: name is already used by an existing object

原因

This can occur if you upgrade from Confluence 4.0 or 4.1 directly to 4.3. It occurs because we attempted to set the index in the Hibernate mapping, as well as with an upgrade task, for some time in the 4.3 code. 

ソリューション

There are two options to resolve this issue:

  1. Upgrade to 4.3.7 instead of 4.3, or the minor versions below 4.3.5. The issue was resolved in Confluence 4.3.5, but we recommend 4.3.7 as it is the final 4.3 bugfix release.
  2. If you must upgrate to 4.3 ~ 4.3.4, you will need to upgrade to 4.2 first. We do not recommend that you skip a major version when upgrading, so the best path would be 4.0 > 4.1 > 4.2 > 4.3. 
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.