Bamboo Data center is not not able to start with exception : Cannot find class

お困りですか?

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

コミュニティに質問

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

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

*Fisheye および Crucible は除く

要約

This knowledge base article covers a scenario where Bamboo was not able to start with exception : Cannot find class [com.atlassian.bamboo.crowd.license.BambooDcLicenseChecker]. 

This page will cover the diagnostics and the solution considering the above missing class during the startup, but the solution will be applicable for any other similar class missing during the startup. 

環境

The issue was seen on Bamboo 9.5.4 but the solution will be applicable for any other supported version of Bamboo. 

診断

Post starting up Bamboo, on the Bamboo GUI HTTP Status 404 - Not found exception is seen:

Looking at <bamboo-home>logs>atlassian-bamboo.log file we can see the below error: 

Error creating bean with name 'hostComponentProvider': Unsatisfied dependency expressed through method 'setSpringHostComponentProviderConfig' parameter 0; nested exception is 
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.bamboo.crowd.license.BambooDcLicenseChecker] for bean with name 'bambooCrowdLicenseService' defined in class path resource [applicationContextEmbeddedCrowd.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.bamboo.crowd.license.BambooDcLicenseChecker

原因

The error basically means that Bamboo is not able to find the class BambooDcLicenseChecker defined under bean bambooCrowdLicenseService inside applicationContextEmbeddedCrowd.xml

Below is definition of this bean inside applicationContextEmbeddedCrowd.xml

applicationContextEmbeddedCrowd.xml
<bean id="bambooCrowdLicenseService" class="com.atlassian.bamboo.crowd.license.BambooDcLicenseChecker"/>

Below are the probable cause for the same

  1. Bamboo user which is running the service is not having the correct read/write access to the Jar file.
  2. Jar file containing the class file is missing.
  3. Jar file is corrupted. 

ソリューション

The first step is to identify the jar file which the missing class belongs to, in the above example Bamboo complains about missing BambooDcLicenseChecker class, to check the jar file we can run the below command inside <bamboo-install> directory.

Search command for Unix
find -type f -iname '*.jar' | xargs grep --text --files-with-matches 'BambooDcLicenseChecker.class'

Result :

Once the jar file is identified then the below solution can be tried. 

ソリューション 1

If the issue is with the Bamboo user not having the correct read/write access to the jar file, please provide the correct read/write access to the Bamboo user to the jar file and restart the Bamboo service.

ソリューション 2

If the solution 1 does not work, then either the jar file is corrupted or missing the class, the ideal approach here is to download the whole installation directory from bamboo-download-archives and replace the jar in the exact same location found above and provide the right access to the user which is running Bamboo and restart the Bamboo service.

(warning) Please take a backup of the original jar file before replacing it. 

ソリューション 3

If the solution 1, 2 does not fix the issue, the idea is to install Bamboo service from scratch by using a fresh download, pointing it to the same home directory and see if it makes any difference.
 Please take a snapshot of the machine especially the home folder, so that you can roll it back to the original state.

 If you are going ahead with solution 3, you'll need to make sure to copy any manual changes done on files like server.xml , setenv.sh/bat etc on the new Bamboo Installation directory. 

Good idea is to install it in a different directory than the original Installation, for example in windows if Bamboo is running inside C Drive, probably move the installation directory to some other location. 

最終更新日 2024 年 8 月 26 日

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

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