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

  • Home
  • SEARCH
  • 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 6044787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:03:05+00:00 2026-05-23T07:03:05+00:00

When i run ant target for junit, following error occurs: Configuration problem: Failed to

  • 0

When i run ant target for junit, following error occurs:

    Configuration problem: Failed to import bean definitions from URL location [classpath:/esw-web-ctx.xml] Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/com/bgc/ecm/core/tools/exceptions/errorpagehandler-ctx.xml] Offending resource: class path resource [esw-web-ctx.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [com/bgc/ecm/core/tools/exceptions/errorpagehandler-ctx.xml]; nested exception is java.net.UnknownHostException: www.springframework.org

    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/esw-web-ctx.xml]
    Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/com/bgc/ecm/core/tools/exceptions/errorpagehandler-ctx.xml]
    Offending resource: class path resource [esw-web-ctx.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [com/bgc/ecm/core/tools/exceptions/errorpagehandler-ctx.xml]; nested exception is java.net.UnknownHostException: www.springframework.org
    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76).......
......

Ant target:

<target name="junit" depends="buildlocal">  
    <delete dir="${JUNIT_REPORT}" failonerror="false"/>
    <mkdir dir="${BUILD_TEST_DIR}" />
    <mkdir dir="${JUNIT_REPORT}" />
    <echo message="Launching JUnit tests" />    
    <copy todir="${BUILD_TEST_DIR}/" overwrite="true">
        <fileset dir="${COMP_TESTCONFIG_DIR}">
            <exclude name="*.properties.template" />
            <exclude name="*.xml.template" />
            <exclude name="*.ccf.template" />
            <exclude name="**/*.bak" />
            <exclude name="**/*.keep" />
            <exclude name="**/*.keep.*" />
            <exclude name="**/*.contrib" />
            <exclude name="**/*.java" />
            <exclude name="**/*.class" />
            <exclude name="**/*.contrib.*" />
        </fileset>
    </copy>  
    <junit printsummary="on" fork="off" haltonfailure="false" failureproperty="junit.failure" showoutput="false">
        <classpath>
            <path refid="CLASSPATH_JUNIT"/>             
        </classpath>            
        <batchtest fork="off"  todir="${BUILD_TEST_DIR}">
           <fileset dir="${TEST_CLASSES_DIR}">
              <include name="**/*Test.class" />
              <include name="**/Test*.class" />     
              <!-- <exclude name="**/EswCacheInitializerTest.class" /> -->      
           </fileset> 
        </batchtest>
        <formatter type="xml" />
    </junit>        
    <echo message="Launching junitreport" />    
    <junitreport todir="${JUNIT_REPORT}">
        <fileset dir="${BUILD_TEST_DIR}">
            <include name="TEST-*.xml" />           
        </fileset>       
        <report format="frames" todir="${JUNIT_REPORT}"/>       
    </junitreport>
    <delete dir="${BUILD_TEST_DIR}" failonerror="false"/>       
    <echo message="**** Junit report generated at the location: ${JUNIT_REPORT} ***"/>
    <echo message="==============================================="/>
    <echo message="******  JUNIT BUILD ENDS - CORE    ******      "/>
    <echo message="==============================================="/>
    <fail if="junit.failure" message="Unit test(s) failed.  See reports at: ${JUNIT_REPORT}"/>
</target>
<path id="CLASSPATH_JUNIT">
    <path refid="LIB_JAVAC"/>
    <pathelement location="${TEST_CLASSES_DIR}" />
    <pathelement location="${BUILD_TEST_DIR}" />
    <pathelement location="${APP_DIR}\bgc-esw-core\target\classes" />
    <pathelement location="${APP_DIR}\bgc-esw-web\target\classes" />
    <pathelement location="${APP_DIR}\bgc-esw-wicket-components\target\classes" />  
    <fileset dir="${BUILD_LIBS_HOME}">
        <include name="*.jar" />
    </fileset>  
    <fileset dir="${APP_DIR}\bgc-esw-web\build" erroronmissingdir="false">
        <include name="bgc-esw-*.jar" />            
    </fileset>  
    <fileset dir="${APP_DIR}\bgc-esw-services\build" erroronmissingdir="false">
        <include name="bgc-esw-service*.jar" />
    </fileset>  
    <fileset dir="${APP_DIR}\bgc-esw-core\build" erroronmissingdir="false">
        <include name="bgc-esw-core*.jar" />
    </fileset>  
    <fileset dir="${APP_DIR}\bgc-esw-wicket-components\build" erroronmissingdir="false">
        <include name="bgc-esw-wicket-components*.jar" />
    </fileset>  
</path>
  • 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-23T07:03:06+00:00Added an answer on May 23, 2026 at 7:03 am

    Check the XML namespaces definitions in that application context definition. It typically contains something like this:

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:task="http://www.springframework.org/schema/task"
    xmlns:util="http://www.springframework.org/schema/util"
    xmlns:security="http://www.springframework.org/schema/security"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    

    I bet that some of the spring XSD files are not in the jars on your classpath; all these should be locally on your system and not downloaded from web.

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

Sidebar

Related Questions

when I run the ant target vssbuild it gives following error. D:\release>ant vssbuild Buildfile:
I have the following in my pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ant-plugin</artifactId> <version>2.3</version> <configuration> <target> <echo
Getting follwing error when I run junit test case report through ant srcipt: Cannot
I have the following tasks in ant: <target name=init-junit depends=init> <mkdir dir=${junit.reports.individual} /> <property
I'm trying to run my junit tests using ant. The tests are kicked off
I have switched to JUnit4.4 from JUnit3.8. I run my tests using ant, all
I can't get my Junit tests to run from my build.xml script. I feel
When I run my Ant build it fails with the following exception: Unexpected element
I'm running JUnit via Ant using a target something like this: <target name=junit depends=compile>
When I am running a junit test from ant I always get: D:\metrike>ant test

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.