Skip to content

Could not initialize inline Byte Buddy mock maker #2952

@linusjf

Description

@linusjf
  • The mockito message in the stacktrace have useful information, but it didn't help:
java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
	at ds.tests.OrdArrayTest$ToStringTests.testDisplay(OrdArrayTest.java:622)
Caused by: java.lang.IllegalStateException: Internal problem occurred, please report it. Mockito is unable to load the default implementation of class that is a part of Mockito distribution. Failed to load interface org.mockito.plugins.MockMaker
Caused by: java.lang.reflect.InvocationTargetException
Caused by: org.mockito.exceptions.base.MockitoInitializationException: 

Could not initialize inline Byte Buddy mock maker.

It appears as if your JDK does not supply a working agent attachment mechanism.
Java               : 19
JVM vendor name    : Oracle Corporation
JVM vendor version : 19.0.2+7
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 19.0.2+7
JVM info           : mixed mode
OS name            : Linux
OS version         : 5.4.147-qgki-g65a062a09cb7

Caused by: java.lang.IllegalStateException: Could not self-attach to current VM using external process

[ERROR] Errors: 
[ERROR]   HighArrayTest$ToStringTests.testDisplay:524 » IllegalState Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
[ERROR]   OrdArrayTest$ToStringTests.testDisplay:622 » IllegalState Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)

https://github.com/Fernal73/DSAlgos

Worked earlier with Java 11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions