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

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:@// INTO staging.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: name is already used by an existing object
	at liquibase.executor.jvm.JdbcExecutor.execute( ~[liquibase-core-2.0.5.jar:na]
	at liquibase.executor.jvm.JdbcExecutor.execute( ~[liquibase-core-2.0.5.jar:na]
	at liquibase.executor.jvm.JdbcExecutor.execute( ~[liquibase-core-2.0.5.jar:na]
	at liquibase.database.AbstractDatabase.checkDatabaseChangeLogLockTable( ~[liquibase-core-2.0.5.jar:na]
	at liquibase.lockservice.LockService.acquireLock( ~[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( ~[ojdbc6-]
	at oracle.jdbc.driver.T4CTTIoer.processError( ~[ojdbc6-]
	at oracle.jdbc.driver.T4C8Oall.processError( ~[ojdbc6-]
	at oracle.jdbc.driver.T4CTTIfun.receive( ~[ojdbc6-]
	at oracle.jdbc.driver.T4CTTIfun.doRPC( ~[ojdbc6-]
	at oracle.jdbc.driver.T4C8Oall.doOALL( ~[ojdbc6-]
	at oracle.jdbc.driver.T4CStatement.doOall8( ~[ojdbc6-]
	at oracle.jdbc.driver.T4CStatement.executeForRows( ~[ojdbc6-]
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout( ~[ojdbc6-]
	at oracle.jdbc.driver.OracleStatement.executeInternal( ~[ojdbc6-]
	at oracle.jdbc.driver.OracleStatement.execute( ~[ojdbc6-]
	at oracle.jdbc.driver.OracleStatementWrapper.execute( ~[ojdbc6-]
	at com.zaxxer.hikari.proxy.StatementProxy.execute( ~[HikariCP-2.4.1.jar:na]
	at com.zaxxer.hikari.proxy.HikariStatementProxy.execute( ~[HikariCP-2.4.1.jar:na]
	at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement( ~[liquibase-core-2.0.5.jar:na]
	at liquibase.executor.jvm.JdbcExecutor.execute( ~[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
  FROM sys.all_objects
  WHERE owner = upper('<user>');

For reference: Connect Bitbucket to Oracle

最終更新日 2016 年 4 月 6 日


Powered by Confluence and Scroll Viewport.