ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moses Guillen <mguil...@fedex.com>
Subject RE: JUnit problem with ANT 1.6
Date Tue, 20 Jan 2004 16:54:50 GMT
It was not apparent that it was the classpath, due to not including any
specific ant stuff in the classpath.  At least I thought.

However, after taking a look in my classpath I was including weblogic.jar
(WebLogic 6.1 sp4) in my class path to compile and resolve dependencies.
After reviewing the contents of the jar, I noticed some ant related classes.

Apparently, the ant classes from the weblogic.jar were being used instead of
the classes from:
 
${env.ANT_HOME}/lib/ant-junit.jar;${env.ANT_HOME}/lib/junit.jar

I verified my classpath with command line parameters -v (verbose) or -d
(debug) and I noticed that weblogic.jar was in the classspath before any
jars in ${env.ANT_HOME}/lib.

To get around the problem, I simply included the ${env.ANT_HOME}/lib folder
before the weblogic.jar and everything worked fine.

+       <fileset dir="${env.ANT_HOME}/lib" includes="*.jar"/>
        <pathelement location="${env.WL_HOME}/lib/weblogic.jar"/>

Thanks Stefan.

Moses

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Wednesday, January 14, 2004 12:32 AM
To: user@ant.apache.org
Subject: Re: JUnit problem with ANT 1.6

On Tue, 13 Jan 2004, Moses Guillen <mguillen@fedex.com> wrote:

>     [junit] Exception in thread "main" java.lang.VerifyError:
>     (class:
>     org/apache/tools/ant/taskdefs/optional/junit/FormatterElement,
>     method: shouldUse signature: (Lorg/apache/tools/ant/Task;)Z)
>     Incompatible object argument for function call

Sounds as if you were mixing parts of different Ant versions.  Check
you CLASSPATH for occurances of old ant.jar or optional.jar elements.

> If I turn the forking off and comment out the line <formatter
> type="xml"/> it works.

*AND* or *OR*?

Does it work with forking but without the XML formatter?  Does a
non-forked version with XML formatter work?

Smells like optional.jar from Ant 1.5.x in the CLASSPATH somewhere.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message