title: Spring session factory not finding mapping files in multiple directories with same class path
body: <p>I am having problems when loading hibernate mappings from multiple paths.</p>
  
  <p>My Spring session factory is define as follows:</p>
  
  <pre><code>&lt;beans&gt;
    ...
    &lt;bean id="sessionFactory" class="org.springframwork.orm.hibernate3.LocalSessionFactory"&gt;
    &lt;/bean&gt;
  
    &lt;property name="mappingLocations"&gt;
      &lt;list&gt;
        &lt;value&gt;classpath:/mapping/*.hbm.xml&lt;/value&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  </code></pre>
  
  <p>When I put my mappings <code>Foo.hbm.xml</code> and <code>Bar.hbm.xml</code> into the directory <code>src/main/resources/mappings</code>, then both mappings are found when Hibernate is initialized.</p>
  
  <p>But when I put <code>Foo.hbm.xml</code> into the directory <code>src/main/resources/mapping</code> and <code>Bar.hbm.xml</code> into the directory <code>src/test/resources/mapping</code>, then only the latter mapping file can be found. Hibernate will fail with "cannot find mapping for Foo" error.</p>
  
  <p>I can see that the mappings are copied to the directories <code>target/classes/mapping</code> and <code>target/test-classes/mapping</code>, so why cannot hibernate (or the spring local session factory bean) find both mapping files? I thought that "classpath:/mapping/*.hbm.xml" would find both <code>target/classes/mapping</code> and <code>target/test-classes/mapping</code> directories?</p>
  
  <p>edit: I am getting this problem when running unit tests, so I expect that mappings found in both <code>src/main/resources</code> and <code>src/test/resources</code> would be found.</p>