Bitbucket Server fails to start when the current locale is Turkish

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

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

原因

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

回避策

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"

    Bitbucket Server 5.0+ では setenv と環境変数に変更があります

    Bitbucket Server 5.0 以降では setenv.shsetenv.bat が取り除かれています。これらのファイルで設定されていたオプションは、環境変数で設定できるようになりました。環境変数の設定場所は、実行先のオペレーティング システムに応じます。

    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.

    たとえば、 JVM_SUPPORT_RECOMMENDED_ARGS を設定するには、ファイルに次の行を追加します。

    JVM_SUPPORT_RECOMMENDED_ARGS=-XX:+HeapDumpOnOutOfMemoryError

    Windows

    Bitbucket Server を実行しているユーザーで、パラメーターを環境変数として設定します。たとえば、JVM_SUPPORT_RECOMMENDED_ARGS を設定したい場合、それを環境変数として作成して適切な値を割り当てます。Bitbucket Server がスタートアップ スクリプトやサービスを利用して起動する際に、この値が取得および適用されます。

  • 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.

最終更新日 2022 年 4 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.