ClassNotFoundException: org.hibernate.service.spi.BasicServiceInitiator

Coding in Idea 2019.3. Project using gradle 4.8.1. Dependencies are connected, as in the screenshot.


Hibernate 4.3.11.Final.

When starting a project, I get this final exception:

Caused by: java.lang.ClassNotFoundException: org.hibernate.service.spi.BasicServiceInitiator
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
… 76 more

I would be grateful for ideas on how to solve this problem.

The solution is that the Hibernate library must have the correct Spring library. For example, for the Hibernate version 5.4.9.Final, the Spring-core version 5.1.6.Final is suitable.