while using Hibernate 5.2.7 in a Gradle Java Project to connect to a MariaDB 10.1.19, I am getting an Exception in thread \"main\" java.lang.NoSuchMethodError: org.hib
What version of the Gradle do you have?
I ask, because I have the same error which occurs after upgrade Gradle from 3.5 to 4.3. The same Hibernate version (5.2.9), the same Spring Boot (1.5.8) but in Gradle 3.5. - OK, 4.3 fail.
I've tested and latest version working fine was for me 3.5.1. I've tested versions from 4.0 to 4.4-rc-6 (latest at this moment).
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
This problem is caused by having an old, incompatible copy of the JPA API on the classpath.
Specifically:
Conflicts with the right version of the JPA 2.1 API:
Unfortunately Maven 3 is still unable to handle re-distributions of the same artifacts, which are sometimes necessary.