title: Cannot modify hibernate settings
body: <p>I created <strong>hibernate.cfg.xml</strong> and <strong>UserDataFromDb.hbm.xml</strong> and tried to put it in a correct place. First time there was exception like <code>"Cannot find hibernate.cfg.xml"</code>, but after several replacement correct place was found. New exception was (with except of lots of other trace):</p>
  
  <blockquote>
    <p>Caused by: org.hibernate.HibernateException: Enum class not found<br>
     Caused by: java.lang.ClassNotFoundException: net.codejava.hibernate.Gender</p>
  </blockquote>
  
  <p>It is ok, because I've forgotten to change tutorial sample code and print my class name. I've fixed this problem, so, now there are no mentions about class Gender in <strong>UserDataFromDb.hbm.xml</strong>. Problem is certainly the same.</p>
  
  <p>I've replaced both <strong>UserDataFromDb.hbm.xml</strong> and <strong>hibernate.cfg.xml</strong> to desktop and even renamed them. So, no there are no either <strong>UserDataFromDb.hbm.xml</strong> or <strong>hibernate.cfg.xml</strong> files on my computer (instead of them -- UserData11FromDb.hbm.xml and hiber111nate.cfg.xml on desktop). Exception are still the same:</p>
  
  <blockquote>
    <p>Caused by: org.hibernate.HibernateException: Enum class not found<br>
     Caused by: java.lang.ClassNotFoundException: net.codejava.hibernate.Gender</p>
  </blockquote>
  
  <p>though neither Gender class nor even configuration and mapping files exist on computer.</p>
  
  <p>Rebooting computer makes no effect.
  OS Windows 7, Hibernate 4.3.6</p>
  
  <p>Config file:</p>
  
  <p>`
  </p>
  
  <pre><code>&lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.dialect"&gt;
              org.hibernate.dialect.MySQLDialect
          &lt;/property&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;
              com.mysql.jdbc.Driver
          &lt;/property&gt;
  
          &lt;!-- Assume test is the database name --&gt;
          &lt;property name="hibernate.connection.url"&gt;
              jdbc:mysql://localhost/abusefinder
          &lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;
              root
          &lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;
  
          &lt;/property&gt;
  
          &lt;!-- List of XML mapping files --&gt;
          &lt;mapping resource="UserDataFromDb.hbm.xml" /&gt;
  
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>mapping:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC 
      "-//Hibernate/Hibernate Mapping DTD//EN"
      "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"&gt; 
  
  &lt;hibernate-mapping&gt;
      &lt;class name="UserDataFromDb" table="user_history"&gt;
          &lt;id name="id" type="int" column="id"&gt;
              &lt;generator class="native"/&gt;
          &lt;/id&gt;
          &lt;list name="operations" cascade="all"&gt;
              &lt;key column="user_id"/&gt;
              &lt;list-index column="idx"/&gt;
              &lt;one-to-many class="Operation"/&gt;
          &lt;/list&gt;
          &lt;property name="maxOpersPerWeek" column="max_opers_per_week" type="int"/&gt;
          &lt;property name="currentOpersPerWeek" column="current_opers_per_week" type="int"/&gt;
          &lt;property name="lastWeekFirstOperationTime" column="last_week_first_operation_time"     type="long"/&gt;
          &lt;property name="addTotal" column="add_total" type="long"/&gt;
          &lt;property name="getTotal" column="get_total" type="long"/&gt;
          &lt;property name="addOpers" column="add_opers" type="int"/&gt;
          &lt;property name="getOpers" column="get_opers" type="int"/&gt;
      &lt;/class&gt;
  
  
      &lt;class name="Operation" table="operations"&gt;
          &lt;id name="operId" type="int" column="oper_id"&gt;
              &lt;generator class="native"/&gt;
          &lt;/id&gt;
          &lt;property name="userId" column="user_id" type="int"/&gt;
          &lt;property name="sum" column="sum" type="long"/&gt;
          &lt;property name="time" column="time" type="long"/&gt;
          &lt;property name="type" column="type"&gt;
              &lt;type name="org.hibernate.type.EnumType"&gt;
                  &lt;param name="enumClass"&gt;databaseaccess.Type&lt;/param&gt;
                  &lt;param name="useNamed"&gt;true&lt;/param&gt;
              &lt;/type&gt;
          &lt;/property&gt;
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>