Agent on IBM Websphere fails to connect to EM with "An error occurred while trying to connect to the Introscope Enterprise Manager."

Document ID : KB000046488
Last Modified Date : 14/02/2018
Show Technical Document Details


 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:

[VERBOSE] [IntroscopeAgent.Agent]
java.lang.NoSuchMethodError: com/wily/introscope/agent/connection/CommandQueue.access$4(Lcom/wily/introscope/agent/connection/CommandQueue;I)V
at com.wily.introscope.agent.connection.CommandQueue$1.set(


[DEBUG] [IntroscopeAgent.Agent] 

java.lang.NoSuchMethodError: com/wily/introscope/agent/connection/IServerFailoverPolicy.setAdditionalFailoverServers(Lcom/wily/isengard/api/ServerInstanceLocator;Lcom/wily/introscope/spec/server/beans/loadbalancing/AdvancedReconnectInfo;)V 

at com.wily.introscope.agent.connection.ConnectionThread.attemptAdvancedConnection( 

at com.wily.introscope.agent.connection.ConnectionThread.connect( 





 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.


Additional Information: