ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Dickson <craig.dick...@kirus.com>
Subject RE: Juinit and java.lang.NoSuchMethodError
Date Fri, 18 Apr 2003 17:13:10 GMT
Your weblogic.jar either includes old JUnit classes, or has a reference in
the manifest file to an old ant.jar that comes with WebLogic.

Run ant with the -v option and it should tell you what classpath your JUnit
task is running with. You will see that the weblogic.jar appears before your
up to date ant.jar, therfore it loads the old ant classes from the
weblogic.jar (or from one it references).

Change your classpath and you should be good to go.


> -----Original Message-----
> From: Pellier Marc [mailto:archi7@onssapl.fgov.be]
> Sent: Friday, April 18, 2003 5:01 AM
> To: 'Ant Users List'
> Subject: Juinit and java.lang.NoSuchMethodError
> 
> 
> When I add in the target test
>     <classpath>
>        <pathelement location="c:/bea/weblogic.jar"/>
>     </classpath>
> 
> I had this stack trace
> 
>     [junit] java.lang.NoSuchMethodError
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFo
> rmatter.startTest(XMLJUnitResultFormatter.java:186)
>     [junit]     at 
> junit.framework.TestResult.startTest(TestResult.java:151)
>     [junit]     at junit.framework.TestResult.run(TestResult.java:103)
>     [junit]     at junit.framework.TestCase.run(TestCase.java:118)
>     [junit]     at 
> junit.framework.TestSuite.runTest(TestSuite.java:208)
>     [junit]     at junit.framework.TestSuite.run(TestSuite.java:203)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
> run(JUnitTestRunner.java:231)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
> main(JUnitTestRunner.java:409)
>     [junit] Exception in thread "main"
> 
> 
> 
> 
> 
> Anyone know what might cause this?
> 
> 
> 
> 
> 
> Example
> 
> <target name="test">
>   <junit fork="yes" haltonfailure="yes">
>     <test name="${test.class.name}" />
>     <formatter type="plain" usefile="false" />
>     <classpath refid="test.classpath" />
>     <classpath>
>        <pathelement location="c:/bea/weblogic.jar"/>
>     </classpath>
>   </junit>
> </target>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
View raw message