It appears as if your JDK does not supply a working agent attachment mechanism.

1,898 views
Skip to first unread message

Tom Fewster

unread,
Dec 1, 2020, 7:11:16 PM12/1/20
to mockito
Hi,

I'm getting the following error when running tests;

java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
...
Could not initialize inline Byte Buddy mock maker.

It appears as if your JDK does not supply a working agent attachment mechanism.
Java               : 15
JVM vendor name    : Oracle Corporation
JVM vendor version : 15.0.1+9-18
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 15.0.1+9-18
JVM info           : mixed mode, sharing
OS name            : Linux
OS version         : 5.9.10-200.fc33.x86_64

I'm using that current latest version of Mockito;

<dependency>
   <groupId>org.mockito</groupId>
   <artifactId>mockito-core</artifactId>
   <version>3.6.28</version>
</dependency>
<dependency>
   <groupId>org.mockito</groupId>
   <artifactId>mockito-inline</artifactId>
   <version>3.6.28</version>
</dependency>


Does anyone have any ideas of what is failing here & how to resolve it?

Many thanks.

Patrik Ek

unread,
Mar 29, 2023, 12:02:14 PM3/29/23
to mockito
Hi,
Did you ever get a solution to this problem?
BR
Patrik

LINUS FERNANDES

unread,
Mar 30, 2023, 8:58:49 AM3/30/23
to moc...@googlegroups.com
It may be simpler to browse through this repo to recreate the issue.


Frankly, I can't recall whether this worked with Java 11 or not. Probably without the module-info usage. 

That's about the time I stopped working o the DSAlgos repo.

This is what I referred to while trying to set up the modules for main and test separately.


Regards,
Linus Fernandes.

On Thu, 30 Mar 2023, 11:27 LINUS FERNANDES, <linus.f...@gmail.com> wrote:
https://github.com/mockito/mockito/issues/2952

Similar problem encountered with Java 19.

Running it on Arch Linux for Android.



--
You received this message because you are subscribed to the Google Groups "mockito" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mockito+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mockito/33738ee5-bc44-46b2-8a9e-9225052856e9n%40googlegroups.com.

LINUS FERNANDES

unread,
Mar 30, 2023, 8:58:54 AM3/30/23
to moc...@googlegroups.com
https://github.com/mockito/mockito/issues/2952

Similar problem encountered with Java 19.

Running it on Arch Linux for Android.



On Wed, 29 Mar 2023, 21:32 Patrik Ek, <ek.p...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages