Home > Blockchain >  Quarkus with Panache getting hibernate error HHH000183
Quarkus with Panache getting hibernate error HHH000183

Time:09-17

I built an application with Quarkus and I'm using Hibernate with Panache for the models. Everything goes well, the application starts, but when I call a webservice to get a list using Panache functionalities (.listAll()), I get an empty list and I see the following message in the console:

HHH000183: no persistent classes found for query class: from com.myproject.model.TeamEntity

My models are defined with @Entity annotations that should allow Hibernate to find by itself the entity mappings. Here is an example with the Team model:

@Entity
@Table(name = "TEAM")
public class TeamEntity extends PanacheEntityBase {

    @Id
    @GeneratedValue(strategy = SEQUENCE, generator = "TEAM_SEQ_GEN")
    @SequenceGenerator(name = "TEAM_SEQ_GEN", sequenceName = "TEAM_SEQ", allocationSize = 10)
    @Column(name = "ID_TEAM", nullable = false)
    private int id;

    @Column(name = "NAME", nullable = false)
    private String name;

    ...

}

I don't have any persistence.xml file in the project, only the application.properties linked with Quarkus. Here are the relevant properties extracted from mine:

quarkus.datasource.db-kind=oracle
quarkus.datasource.jdbc.url=jdbc:oracle:thin:/@MYWALLET
           
  • Related