Skip to content

Build fails with Java 11 #27

@smoyer64

Description

@smoyer64

Some combination of JUnit 5 and the MockitoExtension leads to the following errors (one example included):

[ERROR] exitsIfRequiredBrokerUrlParameterIsMissing  Time elapsed: 0.001 s  <<< ERROR!
org.mockito.exceptions.base.MockitoException:
Unable to initialize @Spy annotated field 'messageProcessor'.
Unable to create mock instance of type 'MessageProcessor'
Caused by: org.mockito.exceptions.base.MockitoException: Unable to create mock instance of type 'MessageProcessor'
Caused by: org.mockito.creation.instance.InstantiationException:

Our dependency on the resteasy-jackson2-provider brings in version 14.0 of Google's guava library (which is ancient). This library uses internal reflection methods that produce the following warnings:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

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