Bitbucket Server fails to start when the current locale is Turkish
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 thebin
subfolder; in the line setting the JVM_REQUIRED_ARGS variable, append the text "
-Duser.language=en -D
" at the end, like:user.country=gb
# # 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
andsetenv.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:ExampleJVM_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
- In order to edit the service, you must run the following:
- Bitbucket Server 4.x
<Bitbucket Server installation directory>/bin/tomcat8w //ES//AtlassianBitbucket Server
- Bitbucket Server 5.x or newer
<Bitbucket Server installation directory>/bin/bservmgr //ES//AtlassianBitbucket
- Bitbucket Server 4.x
In the Atlassian Bitbucket Properties screen, click on the "Java" tab.
Add the lines -Duser.language=en and
-Duser.country=gb at the end
- Click OK to confirm the changes.
- Go back to Windows Services and Start the AtlassianBitbucket service.
Similar resolution for JIRA: Change Locale for Jira server.