title: java.io.FileNotFoundException: class path resource [timex-servlet.properties] cannot be opened because it does not exist
body: <p>I'm getting the following error message when I try to start a spring web application:</p>
  
  <pre><code>2012-04-12 13:53:20,491 ERROR [org.springframework.web.servlet.DispatcherServlet] - 
  
  Context initialization failed
  org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [timex-servlet.properties] cannot be opened because it does not exist
  java.io.FileNotFoundException: class path resource [timex-servlet.properties] cannot be opened because it does not exist
      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137)
      at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:172)
  </code></pre>
  
  <p>I'm running Tomcat (version 6.x) through eclipse. I tried putting timex-servlet.properties in the following directories but to no avail:</p>
  
  <pre><code>WebContent\WEB-INF
  WebContent\WEB-INF\classes
  WebContent\
  </code></pre>
  
  <p>Here is the reference to timex-servlet.properties in timex-servlet.xml:</p>
  
  <pre><code>    &lt;bean id="placeholderConfig"
      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="location"
          value="timex-servlet.properties" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>There are several SO threads dealing with the same message that say to put a classpath: in front of the properties file reference. So I tried the following, which also did not work:</p>
  
  <pre><code>        &lt;bean id="placeholderConfig"
      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="location"
          value="classpath:timex-servlet.properties" /&gt;
  &lt;/bean&gt;
  </code></pre>