In order to avoid using a GraalVM substitution, and given the fact that on native image it is not possible to generate bytecode at runtime, hibernate.bytecode.provider should be set to none when running as native image.