Closed
Description
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
.