2nd Level cache in Hibernate 5.4.27 Final

While I start my app I get the below message for ehCache implementation:
the ehcache second-level cache provider for hibernate is deprecated

I have put below lines in hibernate.cfg.xml :

  <property name="hibernate.cache.use_second_level_cache">true</property>
    <property name="hibernate.cache.region.factory_class">org.hibernate.cache.jcache.JCacheRegionFactory</property>
    <property name="hibernate.javax.cache.provider">org.ehcache.jsr107.EhcacheCachingProvider</property>``` 

Also, have below entries in gradle : 
compile ‘org.hibernate:hibernate-jcache:5.4.27.Final@jar’
compile ‘org.ehcache:ehcache:3.9.2@jar’
compile ‘org.ehcache.modules:ehcache-107:3.9.2@jar’
Now I am getting below error at runtime:
**java.lang.NoClassDefFoundError: javax/cache/configuration/Configuration**

Please help.

You seem to be missing a JCache API dependency, but you should better ask this in the ehcache community.