title: PropertyPlaceholderConfigurer for reading property files and database
body: <p>I am trying to create two PropertyPlaceholderConfigurer's, one for accessing property files and the other for accessing the database... the code is as follows</p>
  
  <pre><code>  &lt;bean id="otherPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="ignoreUnresolvablePlaceholders" value="true"/&gt;
          &lt;property name="properties"&gt;
          &lt;bean class="org.apache.commons.configuration.ConfigurationConverter" factory-method="getProperties"&gt;
              &lt;constructor-arg&gt;
                  &lt;bean class="org.apache.commons.configuration.DatabaseConfiguration"&gt;
                      &lt;constructor-arg ref="myDataSource"/&gt;
                       &lt;constructor-arg value="dbo.APPLICATIONPROPERTIES"/&gt;
                       &lt;constructor-arg value="NAME"/&gt;
                     &lt;constructor-arg value="VALUE"/&gt;
                  &lt;/bean&gt;
              &lt;/constructor-arg&gt;
          &lt;/bean&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
    &lt;bean id="propertyConfigurer" class="com.fexco.wuams.util.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="locations"&gt;
              &lt;list&gt;
                  &lt;value&gt;classpath:database.properties&lt;/value&gt;
              &lt;/list&gt;         
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>I have the following <code>ComboPooledDataSource</code> bean</p>
  
  <pre><code>&lt;bean id="myDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt;
      &lt;property name="driverClass" value="${driver}"/&gt;
      &lt;property name="jdbcUrl" value="${url}"/&gt;
      &lt;property name="user" value="${username}"/&gt;
      &lt;property name="password" value="${password}"/&gt;
      &lt;property name="initialPoolSize" value="5"/&gt;
      &lt;property name="minPoolSize" value="5"/&gt;
      &lt;property name="maxPoolSize" value="5"/&gt;
      &lt;property name="maxIdleTime" value="1200"/&gt;
      &lt;property name="idleConnectionTestPeriod" value="300"/&gt;
    &lt;/bean&gt;
  </code></pre>
  
  <p>which works perfectly for the rest of my application except when i try use it for my <code>bean id="otherPropertyConfigurer"</code>... i get the following error</p>
  
  <pre><code>Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClass' threw exception; nested exception is java.beans.PropertyVetoException: Could not locate driver class with name '${jdbc.driverClassName}'.
      at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
      at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1275)
      ... 72 more
  </code></pre>
  
  <p>if i hardcode the database variables in <code>ComboPooledDataSource</code> (e.g. change <code>${jdbc.driverClassName}</code> to <code>net.sourceforge.jtds.jdbc.Driver</code> everything works fine but for some reason when i add the <code>otherPropertyConfigurer</code>, my original <code>propertyConfigurer</code> does not work</p>
  
  <p>Does anyone have any ideas on how to resolve this?</p>