Show Table of Contents
4.2.3. JBoss モジュール依存関係の検索
依存関係を解決するには、最初に
EAP_HOME/modules/system/layers/base/ ディレクトリー内で ClassNotFoundException によって指定されたクラスが含まれるモジュールを探します。クラスのモジュールを見つけた場合は、マニフェストエントリーに依存関係を追加する必要があります。
たとえば、ログに次の ClassNotFoundException トレースが記録されているとします。
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
from [Module "deployment.TopicIndex.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188)
この場合、次の手順を実行してこのクラスが含まれる JBoss モジュールを探します。
手順4.5 依存関係の特定
- 最初にクラスの明白なモジュールがあるかを判断します。
EAP_HOME/modules/system/layers/base/ディレクトリーへ移動し、ClassNotFoundExceptionで指定されたクラスと一致するモジュールパスを探します。モジュールパスorg/apache/commons/logging/が見つかります。EAP_HOME/modules/system/layers/base/org/apache/commons/logging/main/module.xmlファイルを開き、モジュール名を探します。この例では "org.apache.commons.logging" になります。MANIFEST.MFファイルの Dependencies にモジュール名を追加します。Manifest-Version: 1.0 Dependencies: org.apache.commons.logging
- クラスの明白なモジュールパスがない場合、依存関係を他の場所で探す必要があることがあります。
- Tattletale レポートで
ClassNotFoundExceptionによって命名されたクラスを探します。 EAP_HOME/modulesディレクトリーで JAR が含まれているモジュールを探し、前の手順のとおりにモジュール名を探します。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.