Skip to content

ExceptionInInitializerError thrown in Eclipse OpenJ9 JVM #1118

@mateusbandeiraa

Description

@mateusbandeiraa

When trying to run tests using Eclipse OpenJ9, I get this error:

java.lang.ExceptionInInitializerError
        at com.bar.foo.<clinit>(FooTest.java:24)
Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in java.lang.ClassLoader$CompoundEnumeration@626d5804
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               : 11
JVM vendor name    : Eclipse OpenJ9
JVM vendor version : openj9-0.23.0
JVM name           : Eclipse OpenJ9 VM
JVM version        : 11.0.9+11
JVM info           : JRE 11 Windows 10 amd64-64-Bit Compressed References 20201022_795 (JIT enabled, AOT enabled)
OpenJ9   - 0394ef754
OMR      - 582366ae5
JCL      - 3b09cfd7e9 based on jdk-11.0.9+11
OS name            : Windows 10
OS version         : 10.0

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

I tried running the same test using Oracle's OpenJDK 11 implementation and it ran successfully.

I'm not familiar with Byte Buddy at all, so I don't know how to fix it myself. But I really think there's something wrong with the implementation, because my tests are able to run on a specific JVM but not in other.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions