APM Java Agent on IBM Websphere is unable to connect to the EM. The log shows the error
[ERROR] [IntroscopeAgent.Agent] An error occurred while trying to connect to the Introscope Enterprise Manager.
Putting the agent in VERBOSE logging shows an exception similar to this:
APM Agent on IBM Websphere being run by IBM Java (all versions)
IBM Java can cache code using Class Sharing. This can result in errors such as this after an upgrade, when older versions of the same function call are cached by Java. Sometimes this cache can also store corrupt versions of the code, which will also cause a similar error.
To clear the Class Sharing cache in IBM Java, the application itself has to be restarted with the IBM Java option -Xshareclasses:none or -Xshareclasses:reset, added to the JVM startup arguments.
-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.
Important: Note that each time the Agent is patched or upgraded on IBM Websphere, it is a good idea to clear the IBM Websphere cache via the reset option.