Bitbucket Server Does Not Start - Wrong column type

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Bitbucket Server fails to start after a server reboot. The following appears in the atlassian-bitbucket.log:

Scenario 1

1 2 3 4 5 2013-04-11 17:28:41,712 ERROR [main] o.s.web.context.ContextLoader Context initialization failed ... Caused by: org.hibernate.HibernateException: Wrong column type in PUBLIC.PUBLIC.PLUGIN_STATE for column enabled. Found: boolean, expected: bit ... 97 common frames omitted

or:

Scenario 2

1 Caused by: org.hibernate.HibernateException: Wrong column type in stash.plugin_state for column enabled. Found: tinyint, expected: bit

Cause

Scenario 1:

Bitbucket Server is attempting to start with binaries that are older than the version of the Bitbucket Server data in BITBUCKET_HOME. It is likely that there are more than one Bitbucket Server installations on the server.

Scenario 2:

The Database driver in use doesn't match what is recommended for the specific Bitbucket Server version. In this case, customer was running Bitbucket Server version 3.2.4 and the MySQL driver used was mysql-connector-java-3.0.16. This needed to be updated to/ replaced with mysql-connector-java-5.1.38 .

Resolution

Scenario 1

Locate the most recent (another) Bitbucket Server installation and start the application from this directory.

Scenario 2

Check the "Connecting Bitbucket Server to an external database" documentation that pertains to the specific version of Bitbucket Server being run and ensure the proper driver is being used. 

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.