Bitbucket Server Does Not Start - Wrong column type

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

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

Scenario 1
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
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. 

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.