question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hibernate reactive panache quickstart with UUIDGenerator throws error in native mode

See original GitHub issue

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?

  1. 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;
    }
}
  1. 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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
philippegoncalvescommented, Aug 24, 2022

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

0reactions
guoxunbocommented, Nov 6, 2022

Hello. have the same exception in 2.13.3.final.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simplified Hibernate Reactive with Panache - Quarkus
The solution is located in the hibernate-reactive-panache-quickstart directory. If your project is already configured to use other annotation processors, you ...
Read more >
Getting an error about not having an Identifier even when I ...
package offgrid.models; import io.quarkus.hibernate.reactive.panache.PanacheEntityBase; import javax.persistence.*; import java.time.
Read more >
How Quarkus simplifies Java persistence - Red Hat Developer
This tutorial shows how you can simplify reactive Java applications that persist data using the Hibernate ORM with Panache extension in ...
Read more >
Kickstart your first Quarkus application | by Hantsy - Medium
Follow the Getting Started guide, create your first JAX-RS Resource class. @Path("/hello") ... Hibernate ORM with Panache quarkus-hibernate-orm-panache
Read more >
Getting started with Hibernate reactive on Quarkus
Please note that Hibernate reactive API can be applied both to standard Hibernate ORM and Panache. In this tutorial we will apply reactive...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found