title: problems with Hibernate's integration in Spring
body: <p>I have a simple Java application and I'm trying to integrate Hibernate in Spring but it seems that the Spring configuration file can't find the *.hbm.xml (the mapping resource):
  I have a file named persistence-context.xml that I use it as a Spring config file and I have the following bean declared:</p>
  
  <p>
      
      
      
          
              org.hibernate.dialect.MySQLDialect
          
      
  </p>
  
  <p>But is being thrown the exception:
  java.io.FileNotFoundException: class path resource [pool.hbm.xml] cannot be opened because it does not exist
  I've even tried giving the mapping resources property an absolute path value. It doesn't work.
  Thank you!</p>
  
  <p>UPDATE:
  My Spring conf file:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
         http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
      &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
          &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
          &lt;property name="url" value='jdbc:mysql://localhost/bestofs_seinfeld' /&gt;
          &lt;property name="username" value="root" /&gt;
          &lt;property name="password" value="futifuti825300" /&gt;
          &lt;property name="initialSize" value="5" /&gt;
          &lt;property name="maxActive" value="10" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
          &lt;property name="mappingResources" value="pool.hbm.xml" /&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"&gt;
          &lt;property name="sessionFactory"&gt;
              &lt;ref bean="mySessionFactory"/&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="voteDao" class="bestofs.persistence.HibernatePoolDao"&gt;
      &lt;property name="hibernateTemplate"&gt;
          &lt;ref bean="hibernateTemplate"/&gt;    
      &lt;/property&gt;
  &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>And my pool.hbm.xml is:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;
  &lt;hibernate-mapping&gt;
      &lt;class name="bestofs.persistence.PoolBean" table="sein_pool"&gt;
      &lt;id name="idVote" column="ID_Vote"&gt;
          &lt;generator class="assigned"/&gt;
      &lt;/id&gt;
  
      &lt;property name="IdActor"&gt;
          &lt;column name="ID_Actor"/&gt;
      &lt;/property&gt;
      &lt;property name="IdUser"&gt;
          &lt;column name="ID_User"/&gt;
      &lt;/property&gt;
      &lt;property name="IdSession"&gt;
          &lt;column name="ID_Session"/&gt;
      &lt;/property&gt;
  &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>And both configuration files are on the same folder.</p>