You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Pierpaolo Fumagalli <pi...@apache.org> on 2000/03/01 10:17:46 UTC

Re: Any problems using Ant with new Xerces 1.0.2 in classpath?

Andy Clark wrote:
> 
> Shane_Curcuru@lotus.com wrote:
> > After putting Xerces 1.0.2 into my classpath instead of 1.0.1, trying to
> > compile using (a somewhat older version; Jan-2000) of Ant, I start getting
> > wierd exceptions and the Ant build halts.  This worked fine yesterday, and
> > the only change on the machine is replacing the xerces.jar.
> 
> I don't use ANT so I'm just taking a guess here...
> 
> >From 1.0.1 to 1.0.2, the SAX2 APIs have changed significantly.
> If ANT relies on previous SAX2 interfaces, etc, then I'm not
> surprised that it breaks.

I use ant and it works perfectly (and even better w/ the latest CVS).

It's not a XERCES problem, but a ANT+PROJECTX one. Ant gets shipped with
the default configuration being Project-X (they didn't yet change it!)
and with its own xml.jar containing org.xml.sax and org.w3c.dom.

The problem is that those interfaces are Dom level 1 (while the ones
used by Xerces are DOM level 2), so, depending on wich one gets loaded
first, the second will fail. (If xml.jar is loaded first any application
- like cocoon 2 - depending on dom 2 will not compile, if xerces.jar is
loaded first, the project-x dom builder will not run because its classes
are not implementing the org.w3c.dom interfaces already loaded).

Anywa the problem should be solved having ANT to use JAXP (path I'm
doing right now!)

	Pier

-- 
--------------------------------------------------------------------
-          P              I              E              R          -
stable structure erected over water to allow the docking of seacraft
<ma...@betaversion.org>    <http://www.betaversion.org/~pier/>
-------------------------------------X-X-Mozilla-Status: 0009-------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------