ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Wildfly (formerly JBoss AS) will not start with Agent configured - Exception in thread "main" java.lang.NoClassDefFoundError: com/wily/introscope/agent/AgentShim


Article ID: 37730


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE



When starting Wildfly (formerly JBoss AS) with the APM agent configured the system fails to start correctly and the following error is thrown:

Exception in thread "main" java.lang.NoClassDefFoundError: com/wily/introscope/agent/AgentShim
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



APM 9.7 on Linux – but would affect other environments where Wildfly is supported



The APM classes are not being locatable by the classloader as by default the the Java property jboss.modules.system.pkgs is set to org.jboss.byteman



It is necessary to set the Java property jboss.modules.system.pkgs in the system start up settings to point to the agent class locations. This setting defines the classes which can be located by any classloader in the JVM.

If using the Domain version of the app server you can make this configuration change in the domain.xml by setting the agent startup settings in the main-server-group system-properties definitions i.e.


        <server-group name="main-server-group" profile="full">

            <jvm name="default">

                <heap size="64m" max-size="512m"/>


            <socket-binding-group ref="full-sockets"/>


                <deployment name="QATestApp.ear" runtime-name="QATestApp.ear"/>



                <property name="-Dcom.wily.introscope.agentProfile" value="/root/sw/wildfly-8.0.0.Final/wily/core/config/IntroscopeAgent.profile" boot-time="true"/>

                <property name="-Djboss.modules.system.pkgs" value="com.wily,com.wily.* ,org.jboss.byteman " boot-time="true"/>

                <property name="-javaagent" value="/root/sw/wildfly-8.0.0.Final/wily/Agent.jar" boot-time="true"/>



        <server-group name="other-server-group" profile="full-ha">

            <jvm name="default">

                <heap size="64m" max-size="512m"/>


            <socket-binding-group ref="full-ha-sockets"/>




If using the standalone version of the application  server then this change must be made in the script – standalone.xml cannot be used as no child Java processes are spawned from the settings in that file.

Locate the section where the environment settings are displayed (# Display our environment )in the script and then insert the Agent configuration settings like in the following example

# for APM
,org.jboss.byteman "

# Display our environment

echo "========================================================================="



Release: CEMUGD00200-9.7-Introscope to CA Application-Performance Management-Upgrade Main