ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fionnula Glynn" <>
Subject RE: Ant and Junitreport task
Date Wed, 09 Oct 2002 13:09:04 GMT
Thanks Lynne,

Setting the JUnit fork attribute to "on" worked.



-----Original Message-----
From: Lynne Lawrence []
Sent: 09 October 2002 13:58
To: Ant Users List
Subject: Re: Ant and Junitreport task

Hi Fionnula,

I use junitreport with ant.  I have never seen your particular error.
if you post your target it would help.  Here is my entire target - maybe you
will see something in it to help.

    <target name="ut" depends="buildtest, dropdb, createdb"
            description="run unit tests (will build first)">
        <mkdir dir="${tmpdir}/testresults" />
        <mkdir dir="${tmpdir}/testresults/reports" />
        <junit fork="on" dir="${basedir}" >
                <path refid="testrun.class.path" />
            <formatter type="xml" />
            <batchtest todir="${tmpdir}/testresults">
                <fileset dir="${testsrcdir}">
                    <include name="**/*" />
        <junitreport todir="${tmpdir}/testresults/reports">
            <fileset dir="${tmpdir}/testresults">
                <include name="TEST-*.xml" />
            <report format="frames" todir="${tmpdir}/testresults/reports" />
        <echo message="See results in:" />
        <echo message="  ${tmpdir}/testresults/reports/index.html" />

I have the following jars in $ANT_HOME/lib:


Hope something here helps.


Lynne Lawrence

Fionnula Glynn wrote:

> Hi,
> Has anyone used the junitreport task in Ant?  When I set the report format
> to "xml" I get a 'java.lang.LinkageError: loader constraints violated when
> linking org/w3c/dom/Document class'.  I know it's got something to do with
> the classpaths that I have set, which are as follows:
> .;
> C:\j2sdk1.4.0_02\jre\lib;
> C:\JUnit\junit3.8.1\junit.jar;
> C:\tools\ant\lib;
> C:\j2sdk1.4.0_02\lib\tools.jar;
> C:\JUnit\junit3.8.1\junit\samples;
> I get the same error if I include the xalan.jar and xerces.jar in the
> paths.
> Has anyone seen this before?  I'm going nuts!  :-(
> Fionnuala Glynn.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message