You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an @Embedded field of a generic @Embeddable class, Quarkus / Hibernate now throws an error.
Expected behavior
No error
Actual behavior
java.lang.RuntimeException:
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#defineJpaEntities threw an exception: java.lang.IllegalStateException: io.quarkus.builder.BuildException: Build failure: root.StatusEnum is used as an embeddable but does not have an @Embeddable annotation.
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:867)
at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: io.quarkus.builder.BuildException: Build failure: root.StatusEnum is used as an embeddable but does not have an @Embeddable annotation.
at io.quarkus.hibernate.orm.deployment.JpaJandexScavenger.validateEmbeddable(JpaJandexScavenger.java:510)
at io.quarkus.hibernate.orm.deployment.JpaJandexScavenger.collectEmbeddedTypes(JpaJandexScavenger.java:489)
at io.quarkus.hibernate.orm.deployment.JpaJandexScavenger.collectEmbeddedTypes(JpaJandexScavenger.java:495)
at io.quarkus.hibernate.orm.deployment.JpaJandexScavenger.enlistEmbeddedsAndElementCollections(JpaJandexScavenger.java:323)
at io.quarkus.hibernate.orm.deployment.JpaJandexScavenger.discoverModelAndRegisterForReflection(JpaJandexScavenger.java:96)
at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.defineJpaEntities(HibernateOrmProcessor.java:409)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
... 6 more
Thanks for reporting, yes this slipped through the cracks, it makes sense that this bug occurs when one looks at the code. I'll try to submit a patch ASAP.
Describe the bug
When using an
@Embedded
field of a generic@Embeddable
class, Quarkus / Hibernate now throws an error.Expected behavior
No error
Actual behavior
How to Reproduce?
embeddedError
branchmvn clean verify
Output of
uname -a
orver
Linux XXXXXX 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk 17.0.8.1 2023-08-24
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.4.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Additional information
Code:
The text was updated successfully, but these errors were encountered: