title: Second-level cache is used in the application, but property hibernate.cache.region.factory_class is not given
body: <p>I am getting below error while starting the application, I get this exception only when I add <code>@cache(usage=CacheConcurrencyStrategy.READ_WRITE)</code> annotation on the domain object. If I just use annotation <code>@Cacheable(true)</code> it does not give this error. </p>
  
  <pre><code>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).
  </code></pre>
  
  <p>How is it possible that with just Cacheble it is able to find the factory and using <code>@Cache</code> annotation it isn't ?</p>
  
  <p>persistence.xml </p>
  
  <pre><code>        &lt;property name="hibernate.cache.use_second_level_cache" value="true"/&gt;
          &lt;property name="hibernate.cache.use_query_cache" value="true"/&gt;
          &lt;property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider"/&gt;
          &lt;property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.ehcache.EhCacheRegionFactory"/&gt;
  </code></pre>
  
  <p>I am using Hibernate version 4.x JPA 2.1 on JBoss EAP 6</p>