I am trying to run a gradle project. the build is working correctly but whe I launch gradle run I get this error
org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:32)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
... 30 common frames omitted
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [jcache]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:133)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:152)
... 37 common frames omitted
Caused by: java.lang.ClassNotFoundException: Could not load requested class : jcache
and here are the dependencies in my gradle.build
dependencies {
runtime "com.google.guava:guava:28.1-jre"
runtime "com.opencsv:opencsv:3.9"
runtime "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
runtime "org.yaml:snakeyaml:1.25"
runtime "org.postgresql:postgresql:42.0.0"
runtime "mysql:mysql-connector-java:5.1.41"
runtime "org.hibernate:hibernate-core:5.2.10.Final"
runtime "org.hibernate:hibernate-hikaricp:5.2.10.Final"
runtime "org.hibernate:hibernate-validator:5.4.1.Final"
runtime "org.hibernate:hibernate-jcache:5.2.10.Final"
runtime 'javax.persistence:javax.persistence-api:2.2'
runtime 'org.hibernate:hibernate-ehcache:5.6.8.Final'
runtime 'org.hibernate:hibernate-entitymanager:5.5.2.Final'
runtime "org.hibernate:hibernate-search-orm:5.7.0.Final"
runtime 'org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.
}
I am suspecting an issue with the hibernate libraries versions.
this combination of versions worked for me