java.lang.NoClassDefFoundErrorExceptions after deploying Java Agent on host running JBoss EAP
search cancel

java.lang.NoClassDefFoundErrorExceptions after deploying Java Agent on host running JBoss EAP

book

Article ID: 209978

calendar_today

Updated On:

Products

DX Application Performance Management

Issue/Introduction

We have configured the Java agent with JBoss EAP7.2 as per the documentation with the following java options

-javaagent:/opt/Java-other-20.9.0.13/wily/Agent.jar
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Xbootclasspath/p:/opt/app/jboss-eap-7.2/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final-redhat-00001.jar:/opt/app/jboss-eap-7.2/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.6.Final-redhat-00001.jar
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager,com.wily,com.wily.*

but are getting the following exception reported

java.lang.NoClassDefFoundError: org/wildfly/common/net/HostName
        at org.jboss.logmanager.ExtLogRecord.<init>(ExtLogRecord.java:87)
        at org.jboss.logmanager.Logger.log(Logger.java:796)
        at org.jboss.logging.JBossLogManagerLogger.doLogf(JBossLogManagerLogger.java:53)
        at org.jboss.logging.Logger.logf(Logger.java:2398)
        at org.jboss.msc.service.ServiceLogger_$logger.greeting(ServiceLogger_$logger.java:40)
....

 

Environment

Release : 20.2

Component : APM Agents

Resolution

It is necssary to add wildfly-common-1.4.0.Final-redhat-1.jar to the Xbootclasspath e.g.

 

-Xbootclasspath/p:/opt/app/jboss-eap-7.2/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final-redhat-00001.jar:/opt/app/jboss-eap-7.2/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.6.Final-redhat-00001.jar;/opt/app/jboss-eap-7.2/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.4.0.Final-redhat-1.jar