Hibernate ORM - strange start up failure caused by AnnotationException #12228
Labels
area/hibernate-orm
Hibernate ORM
area/persistence
OBSOLETE, DO NOT USE
kind/bug
Something isn't working
Milestone
Describe the bug
Currently I'm trying to migrate a JakartaEE with EclipseLink project to quarkus and have another issue with the Hibernate extention.
First of all, my project has no JPA issues within the JakartaEE (EclipseLink) environment. I'm not sure whether I'm using a wrong JPA-annotation and EclipseLink does not complain about it or Hibernate is too strict with it's processing of the JPA-annotation.
First I list all issue related classes
(edit: 2020-09-25)
The issue causing entity is as far as I can tell the
Unit
entity and it's@Id
Annotation, which is declared/assigned to none basic instance variable. TheUnit
entity is referenced by theMeasurementDescriptor
entity as a@ManyToOne
relationship.As I mentioned before I'm not sure whether I'm using the annotation against the JPA specification. But in case of eclipseLink it works and I have no issues.
[edit: 2020-09-25]: Ok I notice something. In my project there is another class
ParameterDescriptor
which also has a
@ManyToOne
relationship to theUnit
-Entity just likeMeasurementDescriptor
. Now if I disable the the@ManyToOne
relationship in theParameterDescriptor
class, themvn clean compile quarkus:dev
runs successfully everytime.I guess Hibernate has some issues with the used declaration, which I would categorize as a bug.
The project in its self compiles via maven without any issues, but if I run
mvn clean compile quarkus:dev
I get the following exception in the logBut if I repeat
mvn clean compile quarkus:dev
a couple of times, around 1 of 5 runs quarkus starts without an exceptionExpected behavior
project compiles and quarkus:dev runs without the above mentioned exception.
Actual behavior
As described above, most of the time quarkus:dev fails with the mentioned exception, but sometimes it runs successfully.
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue.
quarkus-hibernate-test.zip
Steps to reproduce the behavior:
mvn clean compile quarkus:dev
(maybe you have to modify the application.properties file)Environment (please complete the following information):
OS:
Linux Zakumo 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
:1.7.2.Final
mvnw --version
orgradlew --version
):The text was updated successfully, but these errors were encountered: