Some Scala based instrumentation tests fail on Java 11+ with Scala 2.13
See original GitHub issueWe’re seeing failures with some of our Scala related instrumentation tests (e.g. com.nr.instrumentation.akka22.test.AkkaTest) that appear to be happening only on Java 11+, which I think are likely due to this bug with Scala 2.13: scala/bug#12340
We’re seeing the same failure:
java.lang.IllegalAccessError: Update to static final field akka.pattern.package$.MODULE$ attempted from a different method (<init>) than the initializer method <clinit>
This can be repro’d locally against main
by running the following if you remove the test annotations (e.g. Java11IncompatibleTest
) that were added to prevent them from running on Java 11+:
./gradlew -Ptest11 :instrumentation:akka-2.2:test --tests "com.nr.instrumentation.akka22.test.AkkaTest" --stacktrace
The following PR was submitted to prevent those tests from running on Java 11+ but we should revisit this at some point in the future to see if we can get these instrumentation tests running on Java 11+ again. https://github.com/newrelic/newrelic-java-agent/pull/481
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
JDK Compatibility
Sometimes new JVM and JDK (Java Development Kit) versions require us to update Scala to remain compatible. Version compatibility table. JDK version, Minimum ......
Read more >intellij idea - Error when working with AspectJ and Scala
It depends on AspectJ Compiler Tools 1.8.10 which only supports Java 8. It is not even the most recent 1.8 release, that should...
Read more >Mockito 2.13.0 API - javadoc.io
This alternative mock maker which uses a combination of both Java instrumentation API and sub-classing rather than creating a new class to represent...
Read more >kamon-io/Kamon - Gitter
Getting some really weird results out of the akka metrics. ... Using latest version of Kamon 2.x, Java 11 OpenJDK and Scala 2.13....
Read more >userguide.pdf
If your Gradle build fails before running any tasks, you may be encountering problems with ... Please use the stable Java Library and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this has suddenly become a lot more urgent as everybody needs to upgrade their new relic java agent https://newrelic.com/blog/nerdlog/security-guidance-for-log4j
Seeing the same error message after upgrading the newrelic java agent in an older akka application on java 11. Java Agent 7.2.0 works fine, 7.3.0 throws this error on startup