title: Intellij classpath error Caused by: java.io.FileNotFoundException
body: <p>The directories of the Intellij project: </p>
  
  <pre><code>src/main/java/rewards/testdb/schema.sql
  src/main/java/rewards/testdb/test-data.sql
  src/main/java/rewards/testdb/config/alternate-datasource-config.xml
  src/main/java/rewards/testdb/config/AlternateDataSourceConfigTests.java
  </code></pre>
  
  <p>The bean configuration under test (from alternate-datasource-config.xml):</p>
  
  <pre><code>&lt;bean id="dataSource-createdFromList" class="org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactoryBean" lazy-init="true"&gt;
      &lt;property name="databaseName" value="rewards" /&gt;
      &lt;property name="databasePopulator"&gt;
          &lt;bean class="org.springframework.jdbc.datasource.init.ResourceDatabasePopulator"&gt;
              &lt;property name="scripts"&gt;
                  &lt;util:list&gt;
                      &lt;value&gt;classpath:rewards/testdb/schema.sql&lt;/value&gt;
                      &lt;value&gt;classpath:rewards/testdb/test-data.sql&lt;/value&gt;
                  &lt;/util:list&gt;
              &lt;/property&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I'm encountering an error in my unit test:</p>
  
  <pre><code>Caused by: java.io.FileNotFoundException: class path resource [rewards/testdb/schema.sql] cannot be opened because it does not exist
      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
  </code></pre>
  
  <p><strong>However, if I modified the directories to:</strong></p>
  
  <pre><code>src/main/java/rewards/testdb/config/schema.sql
  src/main/java/rewards/testdb/config/test-data.sql
  src/main/java/rewards/testdb/config/alternate-datasource-config.xml
  src/main/java/rewards/testdb/config/AlternateDataSourceConfigTests.java
  </code></pre>
  
  <p><strong>and modify my bean config:</strong></p>
  
  <pre><code>&lt;bean id="dataSource-createdFromList" class="org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactoryBean" lazy-init="true"&gt;
          &lt;property name="databaseName" value="rewards" /&gt;
          &lt;property name="databasePopulator"&gt;
              &lt;bean class="org.springframework.jdbc.datasource.init.ResourceDatabasePopulator"&gt;
                  &lt;property name="scripts"&gt;
                      &lt;util:list&gt;
                          &lt;value&gt;classpath:rewards/testdb/config/schema.sql&lt;/value&gt;
                          &lt;value&gt;classpath:rewards/testdb/config/test-data.sql&lt;/value&gt;
                      &lt;/util:list&gt;
                  &lt;/property&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p><strong>...my test passes.</strong></p>
  
  <p><em>Why?</em></p>