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.

The error java.lang.IncompatibleClassChangeError is seen after upgrading the APM Agent from 9.7.1 to 10.7

book

Article ID: 187330

calendar_today

Updated On:

Products

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

Issue/Introduction

Getting java.lang.IncompatibleClassChangeError error on the startup of an application in WebSphere Application Server v8.5.5. This occurred after upgrading the agent version from 9.7.1 to 10.7:

10/21/19 05:19:02 PM AEDT [ERROR] [IntroscopeAgent.Agent] An error occurred while initializing service class com.wily.introscope.agent.intelligent.detection.AutomaticBoundaryDetectionService in "Introscope Automatic Boundary Detection Service".
10/21/19 05:19:02 PM AEDT [ERROR] [IntroscopeAgent.Agent] java.lang.IncompatibleClassChangeError
 at com.wily.introscope.agent.intelligent.detection.Logger.isWarningEnabled(Logger.java:63)
 at com.wily.introscope.agent.intelligent.detection.AutomaticBoundaryDetectionService.shouldStartService(AutomaticBoundaryDetectionService.java:109)
 at com.wily.introscope.agent.intelligent.detection.AutomaticBoundaryDetectionService.doStartService(AutomaticBoundaryDetectionService.java:55)
 at com.wily.introscope.agent.service.ASimpleService.IAgentService_startService(ASimpleService.java:39)
 at com.wily.introscope.agent.service.ServiceAdministrator$ServiceInitializer.startService(ServiceAdministrator.java:604)
 at com.wily.introscope.agent.service.ServiceAdministrator$ServiceInitializer.startServiceSafe(ServiceAdministrator.java:618)
 at com.wily.introscope.agent.service.ServiceAdministrator$ServiceInitializer.IExecutableItem_execute(ServiceAdministrator.java:482)
 at com.wily.util.task.AsynchExecutionQueue$WrapperItem.IExecutableItem_execute(AsynchExecutionQueue.java:414)
 at com.wily.util.task.AsynchExecutionQueue.doTask(AsynchExecutionQueue.java:205)
 at com.wily.util.task.ATask$CoreTask.run(ATask.java:132)
 at java.lang.Thread.run(Thread.java:809)

Cause

The reason that this error shows up is due to a super/parent class being modified and recompiled while the sub/child class is not. This could happen when the super class linked to 9.7.1 was left in the shared classes cache while the sub class from 10.7 refers to it instead of fresh one from 10.7.

Environment

APM Java Agent 10.x 
WebSphere Application Server
IBM JVM
AIX

Resolution

Use one of the following command line parameters when starting the JVM:
-Xshareclasses:none
-Xshareclasses:reset

-Xshareclasses:none starts the application without using the cache and shared classes. This can be a useful short-term solution to confirm that it is a cache related problem.

-Xshareclasses:reset starts the application, with shared classes, then clears the cache and rebuilds it. This is the recommended solution to fix a problem with the cache.

Additional Information

There could be performance impact using these parameters. These flags are not supposed to be kept for long-term use in Production. They are mainly used to test/fix certain known problems when reported. So performance impact of long-term use of these flags is not relevant. Once testing has been completed, remove the parameter from the JVM startup.


See the following link for details on the -Xshareclasses command line option.
https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/openj9/xshareclasses/index.html