How to find missing classes in a webapp running in JBoss EAP 7.4?

Posted on

My webapp is having problems locating certain classes. When I run, I see the following in the log:

2022-08-02 14:30:52,387 WARN  [org.jboss.modules.define] (default task-2) Failed to define class org.apache.phoenix.schema.MetaDataSplitPolicy in Module "" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/apache/phoenix/schema/MetaDataSplitPolicy (Module "" from Service Module Loader): Failed to link org/apache/phoenix/schema/SplitOnLeadingVarCharColumnsPolicy (Module "" from Service Module Loader): org/apache/phoenix/compat/hbase/CompatSteppingSplitPolicy

MetaDataSplitPolicy and SplitOnLeadingVarCharColumnsPolicy are present in our war file, but CompatSteppingSplitPolicy is not. The /usr/lib/phoenix/phoenix-hbase-compat-2.4.1-5.1.2.jar file contains CompatSteppingSplitPolicy. Adding external modules directories in JBoss EAP 6/7 tells how the classpath be extended to deployed content reference directories and files external to the installation. I modified my .bashrc accordingly, and the log file now includes:

module.path = /opt/jboss-eap-7.4/modules:/usr/lib/phoenix/phoenix-hbase-compat-2.4.1-5.1.2.jar:/usr/lib/phoenix/*

Unfortunately, I still get the same error. What can I do to fix it?