question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run any of the latest verions on a OpenJ9 JVM

See original GitHub issue

Describe the bug

Trying to use the Elastic APM agent with an OpenJ9 JVM. However this is causing regular problems when we try to upgrade to a later version. The error that originally was fixed in elastic/apm-agent-java#1415 have come back. This means that it is impossible to use APM with OpenJ9 at this point in time.

Steps to reproduce

Attach the agent to a OpenJ9 JVM. Currently testing with this one: docker.artifactory.ccta.dk/ibm-semeru-runtimes:open-11-jre.

Here’s some of the very long stacktrace that clutters the log:

Caused by: java.lang.IllegalAccessException: Module 'java.base' no access to: package 'java.lang' because module 'java.base' can't read module 'unnamed module @78f2b2cb'
        at java.base/java.lang.invoke.MethodHandles$Lookup.throwIllegalAccessException(Unknown Source)
        at java.base/java.lang.invoke.MethodHandles$Lookup.checkClassModuleVisibility(Unknown Source)
        at java.base/java.lang.invoke.MethodHandles$Lookup.checkClassAccess(Unknown Source)
        at java.base/java.lang.invoke.MethodHandles$Lookup.checkAccess(Unknown Source)
        at java.base/java.lang.invoke.MethodHandles$Lookup.checkAccess(Unknown Source)
        at java.base/java.lang.invoke.MethodHandles$Lookup.findStatic(Unknown Source)
        ... 23 more
java.lang.IllegalAccessError: Module 'java.base' no access to: package 'java.lang' because module 'java.base' can't read module 'unnamed module @78f2b2cb'
        at java.base/java.lang.invoke.MethodHandleResolver.sendResolveMethodHandle(Unknown Source)
        at java.base/java.lang.invoke.MethodHandleResolver.getCPMethodHandleAt(Native Method)
        at java.base/java.lang.invoke.MethodHandleResolver.resolveInvokeDynamic(Unknown Source)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.schedule(Unknown Source)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.submit(Unknown Source)
java.lang.IllegalAccessError: Module 'java.base' no access to: package 'java.lang' because module 'java.base' can't read module 'unnamed module @78f2b2cb'
        at co.elastic.apm.agent.profiler.SamplingProfiler.start(SamplingProfiler.java:681)
        at co.elastic.apm.agent.profiler.ProfilingFactory.start(ProfilingFactory.java:39)
        at co.elastic.apm.agent.impl.ElasticApmTracer.startSync(ElasticApmTracer.java:579)
        at co.elastic.apm.agent.impl.ElasticApmTracer.start(ElasticApmTracer.java:542)
        at java.base/java.lang.invoke.MethodHandleResolver.sendResolveMethodHandle(Unknown Source)      at co.elastic.apm.agent.bci.ElasticApmAgent.initialize(ElasticApmAgent.java:147)

        at java.base/java.lang.invoke.MethodHandleResolver.getCPMethodHandleAt(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Expected behavior

That the agent is sending APM data

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
SylvainJugecommented, Dec 17, 2021

Hi !

We just published the 1.28.2 release that includes this fix, you should now be able to replace the snapshot with an official release.

2reactions
SylvainJugecommented, Dec 14, 2021

Thanks a lot @TueDissingWork and @xmarcusv for validating the fix. We are planning a bugfix release soon, make sure to subscribe to release notifications to know when it’s time to upgrade.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't play on Forge using OpenJ9? : r/feedthebeast - Reddit
Try downgrading one version of openj9 mine works fine.
Read more >
Supported environments - - Eclipse
For practical reasons the Eclipse OpenJ9 JVM does not currently run on every platform. OpenJDK 8. OpenJDK 8 binaries are expected to function...
Read more >
J9 issues and limitations - IBM
There are a number of reasons why the JVM cannot honor a large page request. For example, there might be insufficient large pages...
Read more >
Not able to run Cassandra with Openj9 JVM - Stack Overflow
I installed the latest version of cassandra which is 4.0.3, still I am facing issue. Any solution or alternative?? If there is no...
Read more >
Java - ArchWiki
Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found