Ealstic-apm-agent failed with tomcat

Hi, We are trying to test elastic APM and trying to attach "elastic-apm-agent-1.18.0.jar" with our tomcat and for this we follow guide to export CATALINA_OPTS in setenv.sh file. but when we start tomcat we hit with following error
"Exception in thread "Main Thread" java.lang.UnsupportedClassVersionError: co/elastic/apm/agent/bci/AgentMain : unsupported classversion 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:280)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
FATAL ERROR in native method: processing of -javaagent failed
[ERROR] aborted
JRockit aborted: Unknown error (50)"

Hi,

On which java version are you running? class version 51 is Java 7 which should be supported by APM according to the docs.

Best regards
Wolfram

Hi, we are on java 6.

I don't think Java 6 is Supported

See here

Yes, that's what the reason. Sorry for bothering you people, actually I was not sure about the version at first.
Thanks for support.

1 Like

any alternatives for java 6 version.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.