Bitbucket Server fails to start - Missing column or missing table


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



The following appears in the atlassian-bitbucket.log when starting Bitbucket Server:

Caused by: org.hibernate.HibernateException: Missing column: slug in STASH.STASH_USER
    at org.hibernate.mapping.Table.validateColumns( ~[hibernate-core-4.3.4.Final.jar:4.3.4.Final]
    at org.hibernate.cfg.Configuration.validateSchema( ~[hibernate-core-4.3.4.Final.jar:4.3.4.Final]
    at org.hibernate.tool.hbm2ddl.SchemaValidator.validate( ~[hibernate-core-4.3.4.Final.jar:4.3.4.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>( ~[hibernate-core-4.3.4.Final.jar:4.3.4.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory( ~[hibernate-core-4.3.4.Final.jar:4.3.4.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory( ~[hibernate-core-4.3.4.Final.jar:4.3.4.Final]
    at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory( ~[spring-orm-4.0.0.RELEASE.jar:4.0.0.RELEASE]
    at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory( ~[spring-orm-4.0.0.RELEASE.jar:4.0.0.RELEASE]
    at com.atlassian.bitbucket.internal.hibernate.ExtendedLocalSessionFactoryBean.buildSessionFactory( ~[bitbucket-dao-impl-2.11.4.jar:na]
    at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet( ~[spring-orm-4.0.0.RELEASE.jar:4.0.0.RELEASE]
    ... 9 common frames omitted

Below are some additional entries we've seen related to this problem.

Caused by: org.hibernate.HibernateException: Missing column: remote_address_binary in public.cwd_application_address
Caused by: org.hibernate.HibernateException: Missing column: origin_id in public.repository

Caused by: org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity


There is a mismatch between the application version being used to start Bitbucket Server and the database. Most likely, a newer version of Bitbucket Server was started which was pointed at this database and ran the needed database upgrade tasks. This can result in various columns being dropped from the database. Alternatively, it's possible that an older version of Bitbucket Server has accidentally been started.


If an older version of Bitbucket Server has accidentally be started, locate and start the newest version of Bitbucket Server installed on the server.

If the database was unintentionally upgraded to a newer version of Bitbucket Server, there are two paths forward:

  1. Restore a backup of both the filesystem and database according to Data recovery and backups to a time before the upgrade
  2. Perform the full upgrade to the latest version of Bitbucket Server that has been connected to the database

If you cannot get Bitbucket Server to start open a support request at and provide a dump of the databasechangelog table which Support will use to identify the correct version.

Last modified on Mar 18, 2018


Powered by Confluence and Scroll Viewport.