this is the test I used
but as I said I think the exception is the expected behaviour with bytecode enhancement, see https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java#L574 |