Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I got an error "The schema could not be created" while set up bitbucket server in windows.

ramani_chandran
Contributor
July 16, 2019

when i try to set up bitbucket server in windows i am getting "The schema could not be created" error , I have my local DB installed with bitbucket user created with all the privileges as per atlassian documentation. Also the connection is succeed when i tried from the bitbucket setup page. after this when i tried clicking next, it is showing below error.Can anyone be able to answer this please. FYI i have created the bitbucket user in DB connected  with SYSDBA only 

 

The schema could not be created.
com.atlassian.stash.internal.db.DefaultDatabaseManager.createSchema(DefaultDatabaseManager.java:341)
com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:191)
com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.setupTask(SpringMaintenanceTaskFactory.java:151)
...
Error creating bean with name 'liquibasePrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r1_0/m17.xml::STASH-1842-1::gcrain:
Reason: liquibase.exception.DatabaseException: ORA-12988: cannot drop column from table owned by SYS
[Failed SQL: ALTER TABLE SYS.repository DROP COLUMN description]
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1762)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
...
Migration failed for change set liquibase/r1_0/m17.xml::STASH-1842-1::gcrain:
Reason: liquibase.exception.DatabaseException: ORA-12988: cannot drop column from table owned by SYS
[Failed SQL: ALTER TABLE SYS.repository DROP COLUMN description]
liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
...
ORA-12988: cannot drop column from table owned by SYS
[Failed SQL: ALTER TABLE SYS.repository DROP COLUMN description]
liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2019

Hello,

Thank you for sending over your logs and steps taken for setting up Bitbucket. From the error below the issue is clearly a database issue, possibly with MySQL. This error can be due to the drive used or the permissions not being properly set for the user. To create the user with the proper permissions please use the following:

mysql> CREATE DATABASE bitbucket CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL PRIVILEGES ON bitbucket.* TO 'bitbucketuser'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> QUIT

Source documentation: Connecting Bitbucket Server to MySQL

Once this has been run, please attempt the configuration again and let us know if there are any issues.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events