Elastic apm java agent elastic-apm-agent-1.0.1.jar is not allowing to start our application

(Susanto Mahato) #1

elastic apm java agent elastic-apm-agent-1.0.1.jar is not allowing to start our application.

I am trying to integrate it via generic way. The jar is able to integrate but its failing to our application.

[2018-11-23 18:02:02,599] WARN [request-id=] [x-request-id=] AnnotationConfigEmbeddedWebApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'addToQuartz' defined in class path resource [com/../QuartzConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.quartz.Trigger]: Factory method 'addToQuartz' threw exception; nested exception is java.lang.VerifyError: (class: com/mchange/v2/c3p0/impl/NewProxyPreparedStatement, method: executeQuery signature: (Ljava/lang/String;)Ljava/sql/ResultSet;) Illegal type in constant pool

OS : Debian 7.11
JDK : oracle-java8-jdk

Please let me know if any other information needed?

(Eyal Koren) #2

Hello and thanks for trying out our agent!

Please let me know which version of c3p0 you are using. I am assuming it is quite old, maybe even old enough to have been compiled using a Java 1.4 compiler. If that's indeed the case, there is apparently a problem for our agent in instrumenting such classes.
Fortunately, c3p0 is probably wrapping a JDBC driver, in which case we can still provide JDBC insights by instrumenting the JDBC driver.
Our upcoming bugfix release (hopefully released this week) will include a general fix where agent will just avoid attempting to instrument classes compiled using a compiler of a version older than 5.
So what I suggest is that you now wait for the 1.0.2 version and see what happens with it.

I hope this works out.