Site icon LCDUNG

How to fix org.hibernate.SessionFactory cannot be resolved (Lỗi Hibernate bị ngu)

If run project spring boot or java class error contain below:

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/hibernate/boot/registry/StandardServiceRegistryBuilder

When run class

When run spring boot project

How to resolve:

Access page: https://mvnrepository.com/artifact/org.hibernate/hibernate-core

get version dependency lasted to update pom.xml file below:

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-core</artifactId>
  <version>5.2.11.Final</version>
</dependency>
Exit mobile version