Java Agent unable to start successfully.

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

 

  Problem:

 

  APM Java Agent is not starting up and the following error is logged into the Appserver logs. In addition, no logs are being generated by the Agent.

 [ERROR] [IntroscopeAgent] A problem occurred while attempting to create the delegate agent
 com.wily.introscope.agent.AgentNotAvailableException
at com.wily.introscope.agent.AgentShim.IAgentShim_getAgent(AgentShim.java:675)
at com.wily.introscope.agent.AgentShim.getAgent(AgentShim.java:190)
at com.wily.introscope.api.instrument.JavaAgent.premain(JavaAgent.java:202)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)

 Environment: 

  -Oracle 1.7 JRE

 

 Resolution:

  Issue was caused due to a custom extension deployed in <Wily_Home>/core/ext folder which was compiled with 1.8 JDK. However the Application Server was

 running with 1.7 JRE. As such, Java is backward compatible but not the compiled code. So code compiled with a higher version JRE cannot be run by a lower version JRE, thus causing Agent failure while trying to load the extension. Removing the extension from the ext folder addressed the startup issue.

 

 In general, if above error is seen and all the configuration is validated, then the likely root cause is either an Agent extension that is not compatible with JRE version used by Application Server and\or the Agent itself is compatible with JRE.

 

 Additional Information:

 There are number of third party tools that could be used to determine the Java version used to compile the code that could be useful in above scenario.

 e.g.

 https://code.google.com/p/versioncheck/