Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.50.0 agent fails to start on Java 7 #3655

Closed
jackshirazi opened this issue May 29, 2024 · 3 comments · Fixed by #3657
Closed

1.50.0 agent fails to start on Java 7 #3655

jackshirazi opened this issue May 29, 2024 · 3 comments · Fixed by #3657

Comments

@jackshirazi
Copy link
Contributor

Describe the bug

Wrong version of jctools

Steps to reproduce

Start the agent using java 7

Expected behavior

Should start

Debug logs

Click to expand
[elastic-apm-agent] WARN Java 7 support is deprecated and will be removed in a future version
[elastic-apm-agent] INFO Delaying Elastic APM Agent initialization by 3000 milliseconds.
[elastic-apm-agent] ERROR Failed to start agent
java.lang.reflect.InvocationTargetException
        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 co.elastic.apm.agent.premain.AgentMain.loadAndInitializeAgent(AgentMain.java:157)
        at co.elastic.apm.agent.premain.AgentMain.access$000(AgentMain.java:35)
        at co.elastic.apm.agent.premain.AgentMain$1.run(AgentMain.java:131)
Caused by: java.lang.UnsupportedClassVersionError: org/jctools/queues/atomic/MpmcAtomicArrayQueue : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at co.elastic.apm.agent.premain.ShadedClassLoader.defineClass(ShadedClassLoader.java:171)
        at co.elastic.apm.agent.premain.ShadedClassLoader.findClass(ShadedClassLoader.java:149)
        at co.elastic.apm.agent.premain.ShadedClassLoader.loadClass(ShadedClassLoader.java:133)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at co.elastic.apm.agent.objectpool.ObjectPoolFactory.createRecyclableObjectPool(ObjectPoolFactory.java:43)
        at co.elastic.apm.agent.report.PartialTransactionReporter.<init>(PartialTransactionReporter.java:46)
        at co.elastic.apm.agent.report.ApmServerReporter.<init>(ApmServerReporter.java:161)
        at co.elastic.apm.agent.report.ReporterFactory.createReporter(ReporterFactory.java:40)
        at co.elastic.apm.agent.impl.ElasticApmTracerBuilder.build(ElasticApmTracerBuilder.java:186)
        at co.elastic.apm.agent.impl.ElasticApmTracerBuilder.build(ElasticApmTracerBuilder.java:134)
        at co.elastic.apm.agent.bci.ElasticApmAgent.initialize(ElasticApmAgent.java:165)
        ... 7 more

@SylvainJuge
Copy link
Member

What is surprising is that we recently had a PR to update to 4.0.3 that was expected to fix compatibility with older versions: #3618

Unfortunately the 4.0.3 version has been compiled for Java 8 as target even if it was expected to be java6 compliant. I have opened JCTools/JCTools#392 to report that.

I will revert to 4.0.1 in the mean time until it's fixed.

@jackshirazi
Copy link
Contributor Author

Okay, I remember that one, I reported it last time. I thought I had checked it worked when he published it. Maybe we should double check our dependency

@jackshirazi
Copy link
Contributor Author

hah, no definitely it's not java 7 compatible. I must have checked with the wrong jvm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants