Bamboo Data Center Upgrade fails with the error "this version of the Java Runtime only recognizes class file versions up to XX"

お困りですか?

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

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

This page covers a scenario where a Bamboo upgrade fails while trying to upgrade Bamboo from version 8.0.1 to 9.6 with the error "this version of the Java Runtime only recognizes class file versions up to XX".

環境

This upgrade was tested by performing an upgrade from version 8.0.1 to version 9.6.3 but the solution will be applicable for other Bamboo versions as well

診断

The login page also displays an error 404:

The below error message can be seen in the  <bamboo-install>/logs/localhost.YYYY-XX-XX.log

...
09-Jul-2024 07:19:14.002 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [com.atlassian.bamboo.setup.BootstrapLoa
derListener]
        java.lang.UnsupportedClassVersionError: com/atlassian/bamboo/setup/BootstrapLoaderListener has been compiled by a more recent version of the Java Runtime (class file version
55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [com.atlassian.bamboo.setup.BootstrapLoaderListener])
              
...

The below error message can be seen in the  <bamboo-install>/logs/catalina.out file.

09-Jul-2024 07:19:14.008 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file. 
09-Jul-2024 07:19:14.010 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors.

The error message may also be presented on Bamboo Agents that had been recently upgraded but are still running an earlier (and unsupported) Java version.

原因

As seen in the localhost logs, the Java Runtime can only load class file versions up to 52.0. The upgrade was being carried out to Bamboo 9.6.3 which was using Java class version of 55.0.

In this case, the Java class has been compiled with a higher version of Java and this upgrade was carried out using a lower version of Java, likely Java 8.


Class File Major Versions can be seen below:

Java バージョンCorresponding major versionsSupported major versions
85245 .. 52
115545 .. 55
176145 .. 61
216545 .. 65

ソリューション

Install a compatible Java version. Check the supported platforms matrix for version details. 



最終更新日: 2025 年 1 月 6 日

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

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