Skip to content

Weird classloader issue #2526

Closed
Closed
@schauder

Description

@schauder

With Open JDK 17 I get a weird exception message when my entity is package private, while it works fine, when the entity is public.

Error message:

java.lang.IllegalAccessError: failed to access class com.tsdjb.chapter1.BoardGame from class jdk.proxy2.$Proxy70 (com.tsdjb.chapter1.BoardGame is in unnamed module of loader 'app'; jdk.proxy2.$Proxy70 is in module jdk.proxy2 of loader 'app')

Reproducer: up coming
The actual project is in the subdirectory chapter1.

Running ./mvnw clean verify demonstrates the error. Changing the BoardGame class to public resolves it.

The problem occurs when using getByName, not when using getById.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.com

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions