Mockito Fails In 2019.1 EAP


I have a project that uses mockito as a transitive test dependency but also injects another Java Agent on the fly (using com.ea.agentloader.AgentLoader).

When I run the test with 2018.3.4 it all runs fine.

When I run the test with 2019.1 the test does not run and errors with:

java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker

Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in sun.misc.CompoundEnumeration@52b77d5e
at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(
at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(
at org.mockito.internal.configuration.plugins.Plugins.<clinit>(
at org.mockito.internal.util.MockUtil.<clinit>(
... 42 more
Caused by: org.mockito.exceptions.base.MockitoInitializationException:
Could not initialize inline Byte Buddy mock maker. (This mock maker is not supported on Android.)

There is a somewhat related issue here that seems to think IDEA is doing something to cause the issue. 

IntelliJ IDEA 2018.3.4 (Community Edition)
Build #IC-183.5429.30, built on January 29, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.0-15-generic

IntelliJ IDEA 2019.1 EAP (Ultimate Edition)
Build #IU-191.5701.16, built on February 20, 2019
IntelliJ IDEA EAP User
Expiration date: March 22, 2019
JRE: 1.8.0_202-release-1483-b4 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.0-15-generic



Comment actions Permalink

Please report at with the reproducible test case.

Comment actions Permalink

Also seeing this error, I can no longer run test cases/classes in IntelliJ using Ctrl-Shift-F10, nor Ctrl-Alt-F10. Any help on this issue is appreciated.

Tests are running fine at the command line.

Mockito 3.5.6

Comment actions Permalink

Try to download the latest IntelliJ IDEA version from and check out the discussion on the IDEA-222903.

If the problem remains could you prepare a small demo project in which the problem is reproducible and upload it to (do not forget to specify the UploadID)


Please sign in to leave a comment.