You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Nicolas F Rouquette <ni...@jpl.nasa.gov> on 2005/10/12 22:33:06 UTC

xerces-j 2.7.1 -- bootclasspath vs. classpath for junit tests & tools/xml-apis.jar

The build.xml file for xerces-j has several unit tests written like this:

    <echo message="Running dom.ids.Test ..." />
    <java fork="yes"
         
classpath="${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${build.dir}/classes"

          classname="dom.ids.Test"
          failOnError="yes">   

Without changing anything to the Java 1.4.2 distribution, the test, as
specified above,
fails because it is loads jre/lib/rt.jar before xerces-j's own
tools/xml-apis.jar
and consequently binds to the sun's version of
org/w3c/dom/ls/DOMImplementationLS
instead of the different API in tools/xml-apis.jar.

Without altering the Java 1.4.2 installation, one possibility for
resolving this problem
involves using the bootclasspath instead of the classpath like this:

    <echo message="Running dom.ids.Test ..." />
    <java fork="yes" jvmargs="-Xbootclasspath/p:${tools.dir}/${jar.apis}"
          classpath="${tools.dir}/${jar.resolver}:${build.dir}/classes"
          classname="dom.ids.Test"
          failOnError="yes">   

Is it reasonable to call this a bug?

If so, it should be reported to the bugzilla system
by someone who has proper authorization to do so.

-- Nicolas.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org