quarkus: Hibernate reactive panache quickstart with UUIDGenerator throws error in native mode
Describe the bug
Running a customized hibernate-reactive-panache-quickstart project in native mode throws
Could not interpret id generator strategy [org.hibernate.id.UUIDGenerator]
This looks similar to #1743
Expected behavior
Should work like in dev or jvm mode
Actual behavior
Does not run in native mode
How to Reproduce?
- Customize
hibernate-reactive-panache-quickstart
Fruit class from
@Entity @Cacheable public class Fruit extends PanacheEntity { @Column(length = 40, unique = true) public String name; public Fruit() { } public Fruit(String name) { this.name = name; } }
to
@Entity @Cacheable public class Fruit extends PanacheEntityBase { @Id @GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator") @GeneratedValue(generator = "UUID") public UUID id; @Column(length = 40, unique = true) public String name; public Fruit() { } public Fruit(String name) { this.name = name; } }
- Run project in native mode
Output of uname -a
or ver
MINGW64_NT-10.0-19043 XXXX 1 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys
Output of java -version
openjdk 11.0.11 2021-04-20 LTS OpenJDK Runtime Environment Corretto-11.0.11.9.1 (build 11.0.11+9-LTS) OpenJDK Server VM Corretto-11.0.11.9.1 (build 11.0.11+9-LTS, mixed mode, emulated-client)
GraalVM version (if different from Java)
GraalVM 21.2.0 Java 11 CE (from native container build)
Quarkus version or git rev
2.4.1.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: C:\Users\XXXX.m2\wrapper\dists\apache-maven-3.8.1-bin\2l5mhf2pq2clrde7f7qp1rdt5m\apache-maven-3.8.1 Java version: 11.0.11, vendor: Amazon.com Inc., runtime: C:\copybase\jdk11.0.11_9 Default locale: en_US, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “x86”, family: “windows”
Additional information
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17 (6 by maintainers)
On my side @HknLof I still need to add the @RegisterForReflection mentioned by @Lahres-Dev eventhough it is supposed to work wothout it based on https://github.com/quarkusio/quarkus/issues/1743