Note that there are some explanatory texts on larger screens.

plurals
  1. POant target for junit fails to load spring context xml files
    text
    copied!<p>When i run ant target for junit, following error occurs:</p> <pre><code> 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)....... ...... </code></pre> <p>Ant target:</p> <pre><code>&lt;target name="junit" depends="buildlocal"&gt; &lt;delete dir="${JUNIT_REPORT}" failonerror="false"/&gt; &lt;mkdir dir="${BUILD_TEST_DIR}" /&gt; &lt;mkdir dir="${JUNIT_REPORT}" /&gt; &lt;echo message="Launching JUnit tests" /&gt; &lt;copy todir="${BUILD_TEST_DIR}/" overwrite="true"&gt; &lt;fileset dir="${COMP_TESTCONFIG_DIR}"&gt; &lt;exclude name="*.properties.template" /&gt; &lt;exclude name="*.xml.template" /&gt; &lt;exclude name="*.ccf.template" /&gt; &lt;exclude name="**/*.bak" /&gt; &lt;exclude name="**/*.keep" /&gt; &lt;exclude name="**/*.keep.*" /&gt; &lt;exclude name="**/*.contrib" /&gt; &lt;exclude name="**/*.java" /&gt; &lt;exclude name="**/*.class" /&gt; &lt;exclude name="**/*.contrib.*" /&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;junit printsummary="on" fork="off" haltonfailure="false" failureproperty="junit.failure" showoutput="false"&gt; &lt;classpath&gt; &lt;path refid="CLASSPATH_JUNIT"/&gt; &lt;/classpath&gt; &lt;batchtest fork="off" todir="${BUILD_TEST_DIR}"&gt; &lt;fileset dir="${TEST_CLASSES_DIR}"&gt; &lt;include name="**/*Test.class" /&gt; &lt;include name="**/Test*.class" /&gt; &lt;!-- &lt;exclude name="**/EswCacheInitializerTest.class" /&gt; --&gt; &lt;/fileset&gt; &lt;/batchtest&gt; &lt;formatter type="xml" /&gt; &lt;/junit&gt; &lt;echo message="Launching junitreport" /&gt; &lt;junitreport todir="${JUNIT_REPORT}"&gt; &lt;fileset dir="${BUILD_TEST_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="${BUILD_TEST_DIR}" failonerror="false"/&gt; &lt;echo message="**** Junit report generated at the location: ${JUNIT_REPORT} ***"/&gt; &lt;echo message="==============================================="/&gt; &lt;echo message="****** JUNIT BUILD ENDS - CORE ****** "/&gt; &lt;echo message="==============================================="/&gt; &lt;fail if="junit.failure" message="Unit test(s) failed. See reports at: ${JUNIT_REPORT}"/&gt; &lt;/target&gt; &lt;path id="CLASSPATH_JUNIT"&gt; &lt;path refid="LIB_JAVAC"/&gt; &lt;pathelement location="${TEST_CLASSES_DIR}" /&gt; &lt;pathelement location="${BUILD_TEST_DIR}" /&gt; &lt;pathelement location="${APP_DIR}\bgc-esw-core\target\classes" /&gt; &lt;pathelement location="${APP_DIR}\bgc-esw-web\target\classes" /&gt; &lt;pathelement location="${APP_DIR}\bgc-esw-wicket-components\target\classes" /&gt; &lt;fileset dir="${BUILD_LIBS_HOME}"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;fileset dir="${APP_DIR}\bgc-esw-web\build" erroronmissingdir="false"&gt; &lt;include name="bgc-esw-*.jar" /&gt; &lt;/fileset&gt; &lt;fileset dir="${APP_DIR}\bgc-esw-services\build" erroronmissingdir="false"&gt; &lt;include name="bgc-esw-service*.jar" /&gt; &lt;/fileset&gt; &lt;fileset dir="${APP_DIR}\bgc-esw-core\build" erroronmissingdir="false"&gt; &lt;include name="bgc-esw-core*.jar" /&gt; &lt;/fileset&gt; &lt;fileset dir="${APP_DIR}\bgc-esw-wicket-components\build" erroronmissingdir="false"&gt; &lt;include name="bgc-esw-wicket-components*.jar" /&gt; &lt;/fileset&gt; &lt;/path&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload