I am trying to use second level cache in wildfly8.2 I am setting the properties via JavaConfig Properties properties = new Properties(); properties.setProperty("hibernate.hbm2ddl.auto", hibernateHbm2ddlAuto); properties.setProperty("hibernate.dialect", hibernateDialect); properties.setProperty("hibernate.show_sql", "true"); properties.setProperty("hibernate.cache.use_second_level_cache", "true"); properties.setProperty("hibernate.cache.use_query_cache" , "true");
but I get the following error
- Caused by: org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level cache is used in the application, but property hibernate.cache.region.factory_class is not given; please either disable second level cache or set correct region factory using the hibernate.cache.region.factory_class setting and make sure the second level cache provider (hibernate-infinispan, e.g.) is available on the classpath.
Why is it giving that error as per documentation it is not required. Any input would be helpful.
JPA shared cache / second level cache in WildFly
Thanks Sanjeev.