title: Could not resolve placeholder
body: <p>When i run junit test cases, getting following error:</p>
  
  <pre><code>Invalid bean definition with name 'CacheRegionManagerFactory' defined in class path resource [com/bgc/ecm/core/caching/cacheRegionManager-ctx.xml]: Could not resolve placeholder 'appRoot'
  
  org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'CacheRegionManagerFactory' defined in class path resource [com/bgc/ecm/core/caching/cacheRegionManager-ctx.xml]: Could not resolve placeholder 'appRoot'
  at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:268)
  at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
  </code></pre>
  
  <p>cacheRegionManager-ctx.xml file:</p>
  
  <pre><code>&lt;bean id="CacheRegionManagerFactory" class="com.bgc.ecm.core.caching.CacheRegionManagerFactory"&gt;
            &lt;property name="diskStoreCachePath" value="${diskStoreCacheRootPath}/${appRoot}/was/var/elnino/${appName}/${cloneNumber}"/&gt;
          &lt;property name="defaultRegion" ref="DefaultRegion"/&gt;
          &lt;property name="regionInfos" ref="CustomRegions"/&gt;                
      &lt;/bean&gt;  
  </code></pre>
  
  <p>propertyContext.xml:</p>
  
  <pre><code>&lt;context:property-placeholder 
                 location="classpath:/property/globalContext.properties,     
                         classpath:/property/globalContext-${app.env}.properties,
                         classpath:/property/globalContext-${app.env}-${app.module}.properties,    
                         classpath:/property/applicationContext.properties,
                         classpath:/property/applicationContext-${app.module}.properties,         
                         classpath:/property/applicationContext-${app.env}.properties,           
                         classpath:/property/applicationContext-${app.env}-${app.module}.properties"/&gt;  
  </code></pre>
  
  <p>and applicationContext-DEV-FNT.properties contains:</p>
  
  <pre><code>appName=bgc-elnino-core-cluster
  appRoot=ecm
  cloneNumber=1
  site=elnino-core 
  </code></pre>
  
  <p>Junit target:</p>
  
  <pre><code>&lt;target name="junit" depends="init-junit"&gt;
      &lt;copy todir="${TEST_BUILD_DIR}/" overwrite="true"&gt;
          &lt;fileset dir="${COMP_TESTCONFIG_DIR}"&gt;
              &lt;exclude name="*.properties.template" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt; 
      &lt;junit printsummary="on" fork="yes" forkmode="perBatch" haltonfailure="false" failureproperty="junit.failure" showoutput="false"&gt;           
          &lt;classpath&gt;
              &lt;path refid="CLASSPATH_JUNIT"/&gt;             
          &lt;/classpath&gt;            
          &lt;batchtest fork="no"  todir="${TEST_BUILD_DIR}"&gt;
             &lt;fileset dir="${COMP_TEST_SRC}" erroronmissingdir="false"&gt;                             
                &lt;include name="**/*Test.java" /&gt;
                    &lt;include name="**/Test*.java" /&gt;                          
             &lt;/fileset&gt;              
          &lt;/batchtest&gt;
          &lt;formatter type="xml" /&gt;
      &lt;/junit&gt;    
      &lt;junitreport todir="${JUNIT_REPORT}"&gt;
          &lt;fileset dir="${TEST_BUILD_DIR}"&gt;
              &lt;include name="TEST-*.xml" /&gt;           
          &lt;/fileset&gt;       
          &lt;report format="frames" todir="${JUNIT_REPORT}"/&gt;       
      &lt;/junitreport&gt;      
      &lt;delete dir="${TEST_BUILD_DIR}" /&gt;  
  
  &lt;/target&gt;   
  </code></pre>
  
  <blockquote>
    <p>env variable is:</p>
  </blockquote>
  
  <pre><code>public final void setupEnvironmentPropertiesIfNeeded()
  {
      String address = (new StringBuilder()).append("@").append(Integer.toHexString(System.identityHashCode(this))).toString();
      if(StringUtils.isEmpty(System.getProperty("app.env")))
      {
          LOG.info((new StringBuilder()).append(address).append(" Environment property app.env will be set to DEV").toString());
          System.setProperty("app.env", "DEV");
      } else
      {
          LOG.info((new StringBuilder()).append(address).append(" Environment property app.env already set to:'").append(System.getProperty("app.env")).append("'").toString());
      }
      if(StringUtils.isEmpty(System.getProperty("app.module")))
      {
          LOG.info((new StringBuilder()).append(address).append(" Environment property app.module will be set to FNT").toString());
          System.setProperty("app.module", "FNT");
      } else
      {
          LOG.info((new StringBuilder()).append(address).append(" Environment property app.module already set to:'").append(System.getProperty("app.module")).append("'").toString());
      }
  }
  </code></pre>