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 (or start-bitbucket.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.

For Windows installations, in case you are starting Bitbucket as a Service, you need to follow these steps to add the JVM Options

  1. In order to edit the service, you must run the following:
    1. Bitbucket Server 4.x  <Bitbucket Server installation directory>/bin/tomcat8w //ES//AtlassianBitbucket Server
    2. Bitbucket Server 5.x or newer  <Bitbucket Server installation directory>/bin/bservmgr //ES//AtlassianBitbucket
  2. In the Atlassian Bitbucket Properties screen, click on the "Java" tab.

  3. Add the lines -Duser.language=en and -Duser.country=gb at the end
  4. Click OK to confirm the changes.
  5. Go back to Windows Services and Start the AtlassianBitbucket service.

Similar resolution for JIRA: Change Locale for Jira server.

Last modified on Apr 29, 2022

Was this helpful?

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