title: hibernate.cache.region.factory_class Required in hibernate.cfg.xml
body: <p>I am working on using memcache as second level cache for Hibernate. I am using hibernate-memcached-1.2.4, spymemcached 2.8.0 and hibernate 4.1.4.</p>
  
  <p>But when i try to use it , it gives me error saying</p>
  
  <p><pre>
      Initial sessionfactory creation failedorg.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 class name to property hibernate.cache.region.factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, is available in the classpath).
      Exception in thread "main" java.lang.ExceptionInInitializerError
          at Util.HibernateUtil.(HibernateUtil.java:16)
          at hibba.AccountDAOimpl.getAccount(AccountDAOimpl.java:23)
          at hibba.Connect.main(Connect.java:7)
      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 class name to property hibernate.cache.region.factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, is available in the classpath).
          at org.hibernate.cache.internal.NoCachingRegionFactory.buildTimestampsRegion(NoCachingRegionFactory.java:87)
          at org.hibernate.cache.spi.UpdateTimestampsCache.(UpdateTimestampsCache.java:63)
          at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:510)
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1744)
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1782)
          at Util.HibernateUtil.(HibernateUtil.java:12)
          ... 2 more</pre></p>
  
  <p>The properties written in hibernate.cfg.xml is:</p>
  
  <pre><code>&lt;pre&gt;
  &lt;property name="hibernate.cache.use_query_cache"&gt;true&lt;/property&gt;
  &lt;property name="cache.provider_class"&gt;com.googlecode.hibernate.memcached.MemcachedCacheProvider &lt;/property&gt;
          &lt;property name="hibernate.memcached.memcacheClientFactory"&gt;com.googlecode.hibernate.memcached.dangamemcached.DangaMemcacheClientFactory&lt;/property&gt;      
          &lt;property name="hibernate.Memcached.servers"&gt; localhost:11211 &lt;/property&gt;
          &lt;property name="hibernate.Memcached.cacheTimeSeconds"&gt;300&lt;/property&gt;
          &lt;property name="hibernate.Memcached.connectionFactory"&gt;KetamaConnectionFactory&lt;/property&gt; &lt;/pre&gt;
  </code></pre>