Bitbucket Server fails to start when the current locale is Turkish

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Bitbucket Server fails to start when the current locale is Turkish, with the following (abbreviated) error in the log:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]:
...
nested exception is org.hibernate.HibernateException: Missing column: id in PUBLIC.PUBLIC.CHANGESET

Cause

This is a bug in a third-party library that Bitbucket Server uses: HHH-8765 - Column not found in Turkish locale.

Workaround

Configure Bitbucket Server to start with a English locale:

  • in the directory where Bitbucket Server is installed, open the configuration file setenv.sh, located in the bin subfolder;
  • in the line setting the JVM_REQUIRED_ARGS variable, append the text "-Duser.language=en -Duser.country=gb" at the end, like:

    #
    # The following are the required arguments needed for Atlassian Bitbucket Server.
    #
    JVM_REQUIRED_ARGS="-Djava.awt.headless=true -Dfile.encoding=${JVM_FILE_ENCODING} -Datlassian.standalone=BITBUCKET -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.apache.catalina.connector.Response.ENFORCE_ENCODING_IN_GET_WRITER=false -Duser.language=en -Duser.country=gb"

    setenv and environment variable changes in Bitbucket Server 5.0+

    Starting with Bitbucket Server 5.0, setenv.sh and setenv.bat have been removed. The options that were set in this file can now be set via environment variables. Where to set the environment variable depends on which Operating System you're running on.

    Linux

    When using the atlbitbucket service on Linux, the environment variables are ignored. You must set the parameters in _start-webapp.sh. These values will be read when the service starts.

    As an example, to set JVM_SUPPORT_RECOMMENDED_ARGS, you would add this line to the file:

    Example
    JVM_SUPPORT_RECOMMENDED_ARGS=-XX:+HeapDumpOnOutOfMemoryError

    Windows

    Set the parameter as an environment variable for the user running Bitbucket Server. For example, if you want to set JVM_SUPPORT_RECOMMENDED_ARGS, create it as an environment variable and assign the appropriate value to it. When Bitbucket Server starts using the startup scripts or service, it will pick up and apply this value.

  • restart Bitbucket Server.

Similar resolution for JIRA: Change Locale for Jira server.

Last modified on May 4, 2017

Was this helpful?

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