micronaut-core
micronaut-core copied to clipboard
JPA App working on JVM fails with "org.hibernate.AnnotationException" when running native
Expected Behavior
The application should run native when built with "./gradlew clean dockerBuildNative" the same way as it runs when built with "./gradlew dockerBuild".
Actual Behaviour
When running the native application, I get a org.hibernate.AnnotationException: com.example.DemoClassId has no persistent id property: com.example.DemoClass.id
Steps To Reproduce
clone https://github.com/tmohme/mn-defect-demo, then
- run
./gradlew dockerBuild
- run 'docker run demo:latest' => should work
- run
./gradlew dockerBuildNative
- run 'docker run demo:latest' => fails with
org.hibernate.AnnotationException: com.example.DemoClassId has no persistent id property: com.example.DemoClass.id
Environment Information
- macOS 12.5, Intel CPU
- OpenJDK 64-Bit Server VM Zulu11.56+19-CA (build 11.0.15+10-LTS, mixed mode)
Example Application
https://github.com/tmohme/mn-defect-demo
Version
3.6.0