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.

IllegalArgumentException when using Java 16 and higher

See original GitHub issue

The library currently cannot be used with Java 16.

When running the ClientOfMutabilityDetector tests with Java 16 (library built locally with 1.8), it produces the following results:

Tests run: 172, Failures: 0, Errors: 26, Skipped: 1

One of the failures includes this message:

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 60

This is the build environment I used to reproduce the issue:

; mvn --version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/local/Cellar/maven/3.8.1/libexec
Java version: 16.0.1, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "11.3", arch: "x86_64", family: "mac"

In addition, when building MutabilityDetector with Java 16, it produces the following test results:

Tests run: 371, Failures: 0, Errors: 77, Skipped: 5

Again, one of the test failures includes the message:

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 60

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
l0scommented, Jan 31, 2022

I can confirm this solves the issue. Thanks @Grundlefleck!

1reaction
Grundlefleckcommented, Jan 26, 2022

Apologies, I missed the notification of this. I aim to cut a new release soon (most likely using your PR).

Read more comments on GitHub >

github_iconTop Results From Across the Web

IllegalArgumentException (Java SE 16 & JDK 16)
Constructs a new exception with the specified detail message and cause. Note that the detail message associated with cause is not automatically incorporated...
Read more >
How to fix java.lang.UnsupportedClassVersionError
java.lang.UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime.
Read more >
How to Fix UnsupportedClassVersion Error in Java - Rollbar
The UnsupportedClassVersionError in Java occurs when the JVM attempts to read a malformed or otherwise erroneous class file.
Read more >
Why and How to Upgrade to Java 16 or 17 - InfoQ
First, I recommend upgrading your dependencies on the old version of Java. That way you can focus on making the dependencies work without ......
Read more >
Fix: "Compiled by a more recent version" Java error - YouTube
Trying to host a server on the newest Minecraft 1.17 server, but getting an error? Using any other Java program and it's complaining...
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