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.

Version 1.10.3 is not compatible with Java 8 runtime

See original GitHub issue

Trying to run a test with mockK 1.10.3 results in the following exception being thrown:

io/mockk/proxy/jvm/dispatcher/JvmMockKDispatcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
java.lang.UnsupportedClassVersionError: io/mockk/proxy/jvm/dispatcher/JvmMockKDispatcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.findBootstrapClass(Native Method)
	at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1008)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:407)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at io.mockk.proxy.jvm.dispatcher.BootJarLoader.loadBootJar(BootJarLoader.kt:32)
	at io.mockk.proxy.jvm.JvmMockKAgentFactory.initInstrumentation(JvmMockKAgentFactory.kt:146)
	at io.mockk.proxy.jvm.JvmMockKAgentFactory.init(JvmMockKAgentFactory.kt:34)
	at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:46)
	at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)

Downloading the mockk-agent-jvm-1.10.3.jar artifact from bintray, and running the following command confirms that JvmMockKDispatcher is using the Java 11 class file format (version 55):

javap -verbose JvmMockKDispatcher.class | grep version
  minor version: 0
  major version: 55

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:6

github_iconTop GitHub Comments

1reaction
ashutoshgngwrcommented, Dec 13, 2020

@OmarBeshary Use 1.10.3-jdk8 instead of 1.10.3.

1reaction
Raibazcommented, Dec 1, 2020

Thanks for spotting this, going to run some tests and then release a Java 8 compatible version soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting '**** WRONG JAVA VERSION ****' on running ant ...
Got it!!! java 1.8.45 is not compatible with ant 1.9.1. Switched to java 1.7.67 (both jdk and jre) and everything is working fine....
Read more >
Freeplane 1.10.x with Java 17 support, Groovy 4 and some ...
Freeplane 1.10 runs on Java 17 or later. Unfortunately, Java 8 and Java 17 have incompatible options and the launcher can not support...
Read more >
Java SE 10 Archive Downloads - Oracle
Java SE 10 Archive Downloads. Go to the Oracle Java Archive page. The JDK is a development environment for building applications using the...
Read more >
Java 8 release changes
Java 8 Release Highlights. This article applies to: Java version(s): 8.0. This page highlights changes impacting end users for each Java release.
Read more >
Java SDK downloads, version 8.0 - IBM
IBM® SDK, Java Technology Edition, Version 8 contains the latest virtual machine technology from IBM. Downloads contain the latest IBM fixes ...
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