Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6252781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:52:06+00:00 2026-05-24T13:52:06+00:00

When i run junit test cases, getting following error: Invalid bean definition with name

  • 0

When i run junit test cases, getting following error:

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)

cacheRegionManager-ctx.xml file:

<bean id="CacheRegionManagerFactory" class="com.bgc.ecm.core.caching.CacheRegionManagerFactory">
          <property name="diskStoreCachePath" value="${diskStoreCacheRootPath}/${appRoot}/was/var/elnino/${appName}/${cloneNumber}"/>
        <property name="defaultRegion" ref="DefaultRegion"/>
        <property name="regionInfos" ref="CustomRegions"/>                
    </bean>  

propertyContext.xml:

<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"/>  

and applicationContext-DEV-FNT.properties contains:

appName=bgc-elnino-core-cluster
appRoot=ecm
cloneNumber=1
site=elnino-core 

Junit target:

<target name="junit" depends="init-junit">
    <copy todir="${TEST_BUILD_DIR}/" overwrite="true">
        <fileset dir="${COMP_TESTCONFIG_DIR}">
            <exclude name="*.properties.template" />
        </fileset>
    </copy> 
    <junit printsummary="on" fork="yes" forkmode="perBatch" haltonfailure="false" failureproperty="junit.failure" showoutput="false">           
        <classpath>
            <path refid="CLASSPATH_JUNIT"/>             
        </classpath>            
        <batchtest fork="no"  todir="${TEST_BUILD_DIR}">
           <fileset dir="${COMP_TEST_SRC}" erroronmissingdir="false">                             
              <include name="**/*Test.java" />
                  <include name="**/Test*.java" />                          
           </fileset>              
        </batchtest>
        <formatter type="xml" />
    </junit>    
    <junitreport todir="${JUNIT_REPORT}">
        <fileset dir="${TEST_BUILD_DIR}">
            <include name="TEST-*.xml" />           
        </fileset>       
        <report format="frames" todir="${JUNIT_REPORT}"/>       
    </junitreport>      
    <delete dir="${TEST_BUILD_DIR}" />  

</target>   

env variable is:

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());
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:52:06+00:00Added an answer on May 24, 2026 at 1:52 pm

    issue can be solved by passing “-DappRoot=ECM” parameter and other required parameters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a custom test runner for JUnit test cases using JUnitCore's run(junit.framework.Test
I'm trying to run a particular JUnit test by hand on a Windows XP
I'm trying to write Junit4 test cases for my Groovy code. The Junit 4
Time elapsed (time taken?) to run(and pass) my Junit test case is shown as
I'm trying to run my junit tests using ant. The tests are kicked off
What GUI should use to run my JUnit tests, and how exactly do I
At work we are currently still using JUnit 3 to run our tests. We
I am running a Junit test case on my eclipse application that was built
I'm having an issue getting surefire to run Junit4 tests. This same issue was
I'm using Spring 3.0.4 and JUnit 4.5. My test classes currently uses Spring's annotation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.