4.2.3. Find the JBoss Module Dependency
To resolve the dependency, first, try to find the module that contains the class specified by the
ClassNotFoundException
by looking in the EAP_HOME/modules/system/layers/base/
directory. If you find a module for the class, you must add a dependency to the manifest entry.
For example, if you see this ClassNotFoundException trace in the log:
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)Find the JBoss module containing this class by doing the following:
Procedure 4.5. Find the Dependency
- First determine if there is an obvious module for the class.
- Navigate to the
EAP_HOME/modules/system/layers/base/
directory and look for the module path matching class named in theClassNotFoundException
.You find the module pathorg/apache/commons/logging/
. - Open the
EAP_HOME/modules/system/layers/base/org/apache/commons/logging/main/module.xml
file and find the module name. In this case, it is "org.apache.commons.logging". - Add the module name to the Dependencies in the
MANIFEST.MF
file:Manifest-Version: 1.0 Dependencies: org.apache.commons.logging
- If there is no obvious module path for the class, you may need to find the dependency in another location.
- Find the class named by the
ClassNotFoundException
in the Tattletale report. - Find the module containing the JAR in the
EAP_HOME/modules
directory and find the module name as in the previous step.