Bitbucket Server fails to start after Oracle database migration - ORA-00955 name is already used by an existing object

お困りですか?

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

コミュニティに質問

プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。

問題

In an attempt to create a staging instance, the following steps were taken:

  1. Create new DB user.
  2. Export production database. 
  3. Import production data.
  4. Update bitbucket.properties.

Upon start up, the following error is found in the application log in the atlassian-bitbucket.log:

2015-11-20 20:05:41,684 WARN  [spring-startup]  o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.atlassian.stash.internal.project.ProjectDao]: : Error creating bean with name 'projectDao' defined in URL 

...
Caused by: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE staging.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255 CHAR), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@//10.10.10.100:1555/stagingINSERT INTO staging.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: name is already used by an existing object
	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) ~[liquibase-core-2.0.5.jar:na]
	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) ~[liquibase-core-2.0.5.jar:na]
	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:70) ~[liquibase-core-2.0.5.jar:na]
	at liquibase.database.AbstractDatabase.checkDatabaseChangeLogLockTable(AbstractDatabase.java:571) ~[liquibase-core-2.0.5.jar:na]
	at liquibase.lockservice.LockService.acquireLock(LockService.java:94) ~[liquibase-core-2.0.5.jar:na]
	... 9 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
	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.executeInternal(OracleStatement.java:1890) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0]
	at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1855) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0]
	at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:304) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0]
	at com.zaxxer.hikari.proxy.StatementProxy.execute(StatementProxy.java:94) ~[HikariCP-2.4.1.jar:na]
	at com.zaxxer.hikari.proxy.HikariStatementProxy.execute(HikariStatementProxy.java) ~[HikariCP-2.4.1.jar:na]
	at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92) ~[liquibase-core-2.0.5.jar:na]
	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ~[liquibase-core-2.0.5.jar:na]
	... 13 common frames omitted

原因

While the new user was created and the data was imported, a View was not created for the new user.

ソリューション

Create the View for the new user:

CREATE VIEW <user>.all_objects AS
  SELECT *
  FROM sys.all_objects
  WHERE owner = upper('<user>');

For reference: Connect Bitbucket to Oracle

最終更新日 2016 年 4 月 6 日

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

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