title: Hibernate NoCacheRegionFactoryAvailableException
body: <p>I'm getting a bizarre Hibernate exception that I can't explain. It's telling me that I'm using 2nd level cache, but no where in <code>hibernate.cfg.xml</code> do I specify a 2nd level cache. Here's the exception:</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).
      at org.hibernate.cache.internal.NoCachingRegionFactory.buildEntityRegion(NoCachingRegionFactory.java:69)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:348)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1769)
      at net.me.myapp.common.dao.SessionFactoryProvider.newSessionFactory(SessionFactoryProvider.java:37)
      at net.me.myapp.common.dao.BaseDAO.doPersist(BaseDAO.java:28)
      at net.me.myapp.common.dao.WordDAO.deleteAllWords(WordDAO.java:36)
      at net.me.myapp.tools.dmapper.DictionaryMapper.run(DictionaryMapper.java:88)
      at net.me.myapp.tools.dmapper.DictionaryMapper.main(DictionaryMapper.java:56)
  </code></pre>
  
  <p>And my <code>hibernate.cfg.xml</code>:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
      "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;!-- DataSource &amp; Connection info. --&gt;
          &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.H2Dialect&lt;/property&gt;
          &lt;property name="hibernate.connection.driver.class"&gt;org.h2.Driver&lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:h2:file:/${MYAPP_HOME}/data/myapp&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;myapp&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;mypassword&lt;/property&gt;
          &lt;property name="hibernate.connection.pool_size"&gt;1&lt;/property&gt;
  
          &lt;!-- General Hibernate settings. --&gt;
          &lt;property name="show_sql"&gt;true&lt;/property&gt;
          &lt;property name="format_sql"&gt;true&lt;/property&gt;
          &lt;property name="use_sql_comments"&gt;true&lt;/property&gt;
  
          &lt;!-- DDL Mode. --&gt;
          &lt;property name="hbm2ddl.auto"&gt;validate&lt;/property&gt;
  
          &lt;!-- All our Hibernate mapping XML files. --&gt;
          &lt;mapping class="net.me.myapp.common.dto.WordDTO" /&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>Any ideas what would be triggering this exception? Thanks in advance!</p>