org.hibernate.bytecode.enhance.spi.EnhancementException: Enhancement of [org.acme.domain.MyEntity] failed #44863
Labels
area/hibernate-orm
Hibernate ORM
kind/bug-thirdparty
Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.
Describe the bug
Exception occurs during Build:
org.hibernate.bytecode.enhance.spi.EnhancementException: Enhancement of [org.acme.domain.MyEntity] failed because no field named [modelType] could be found for property accessor method [getModelType]. To fix this, make sure all property accessor methods have a matching field.
Expected behavior
The Build should succeed.
Actual behavior
When building the project:
ERROR] Caused by: java.util.concurrent.ExecutionException: org.hibernate.bytecode.enhance.spi.EnhancementException: Enhancement of [org.acme.domain.MyEntity] failed because no field named [modelType] could be found for property accessor method [getModelType]. To fix this, make sure all property accessor methods have a matching field.
How to Reproduce?
Reproducer: https://github.com/KaiSuchomel/quarkus-test/tree/hibernate
Just build the project with maven.
Simple Entity:
After changing the PrePersist setter to a seperate name the build is working:
Output of
uname -a
orver
Darwin Mac-C6VD4H4XT3 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:00:32 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6030 arm64
Output of
java -version
openjdk version "21.0.5" 2024-10-15 OpenJDK Runtime Environment Homebrew (build 21.0.5) OpenJDK 64-Bit Server VM Homebrew (build 21.0.5, mixed mode, sharing)
Quarkus version or git rev
3.17.2 --> hibernate-core 6.6.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven home: /opt/homebrew/Cellar/maven/3.9.9/libexec Java version: 21.0.5, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk@21/21.0.5/libexec/openjdk.jdk/Contents/Home Default locale: de_DE, platform encoding: UTF-8 OS name: "mac os x", version: "15.1.1", arch: "aarch64", family: "mac"
Additional information
@yrodiere Can you please check. Thx.
See: hibernate/hibernate-orm@b5221e2#diff-5f775bce3db8bc5527104f2eba37fef522276d3bed00a3276545528ab233c380R16
The text was updated successfully, but these errors were encountered: