title: Could not resolve Spring property placeholder
body: <p>I have my config:</p>
  
  <pre><code>&lt;context:property-placeholder location="classpath:idm.properties" /&gt;
  
  &lt;bean id="idmPropertyHolder" class="fi.utu.resurssitilaus.idm.IdmPropertyHolder"&gt;
     &lt;property name="url" value="${idm.url}" /&gt; 
      &lt;property name="user" value="${idm.user}" /&gt;
      &lt;property name="password" value="${idm.password}" /&gt;
      &lt;property name="proxyHost" value="${http.proxyHost}" /&gt;
      &lt;property name="proxyPort" value="${http.proxyPort}" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I get the error</p>
  
  <pre><code>    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
      org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'idmPropertyHolder' defined in ServletContext resource [/WEB-INF/idm-config.xml]: Could not resolve placeholder 'idm.url'
              at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272)
              at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
              at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
              at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
              at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
              at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
              at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:514)
              at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1288)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
              at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
              at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1473)
              at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:824)
              at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:350)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:196)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
              at java.lang.Thread.run(Thread.java:619)
      24.1.2011 9:19:05 org.apache.catalina.core.ApplicationContext log
      INFO: Closing Spring root WebApplicationContext
      24.1.2011 9:19:05 org.apache.catalina.core.ApplicationContext log
      INFO: Shutting down log4j
  </code></pre>
  
  <p>I know this could be missing properties file, but I have it in my classpath just right. What is missing? </p>
  
  <p>My web.xml:</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
        /WEB-INF/base-config.xml
        /WEB-INF/idm-config.xml
        /WEB-INF/ldap-config.xml
        /WEB-INF/sec-config.xml
  
      &lt;/param-value&gt;
    &lt;/context-param&gt;
  
    &lt;!-- Reads request input using UTF-8 encoding --&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;characterEncodingFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;encoding&lt;/param-name&gt;
        &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;forceEncoding&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
    &lt;/filter&gt;
  
  
    &lt;filter&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
    &lt;/filter&gt;
  
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;characterEncodingFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
  
  
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
  
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  
  
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.security.web.session.HttpSessionEventPublisher&lt;/listener-class&gt;
    &lt;/listener&gt;
  
    &lt;!-- Handles all requests into the application --&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
        &lt;param-value&gt;
          /WEB-INF/app-config.xml
  
        &lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
  
    &lt;servlet&gt;
      &lt;servlet-name&gt;tiles&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.apache.tiles.web.startup.TilesServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;
          org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
        &lt;/param-name&gt;
        &lt;param-value&gt;
          /WEB-INF/tiles-config.xml
        &lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
    &lt;session-config&gt;
      &lt;session-timeout&gt;
        30
      &lt;/session-timeout&gt;
    &lt;/session-config&gt;
  
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;redirect.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>