You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Sh...@lotus.com on 2000/02/24 18:44:14 UTC

Any problems using Ant with new Xerces 1.0.2 in classpath?

This is more of a curiosity than necessarily a problem, but I was wondering
if other people had seen this.

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.

The first thing I'm doing is downloading a more recent Ant build and trying
that out, but I'm still curious as to why I get the below errors when I use
Xerces 1.0.2

-- If I run normally, I happen to have the xerces.jar first on the
classpath, and get this error:
java -classpath .\build;;e:\JDKs\jdk1.1.8\lib\classes.zip;e:
\jdks\jsdk2.0\lib\jsdk.jar;..\xml-xalan\xalan.jar;..\xml-xalan\bsf.jar;..
\xml-xalan\bsfengines.jar;..\xml-xerces\java\xerces.jar;..
\xml4j\xml4j.jar;api\ant.jar;api\javac.jar;api\projectx-tr2.jar
org.apache.tools.ant.Main footarget
Buildfile: build.xml
Detected Java Version: 1.1
java.lang.IncompatibleClassChangeError: Unimplemented interface method
        at org.apache.tools.ant.SunParser.parse(SunParser.java:76)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:84)
        at org.apache.tools.ant.Main.runBuild(Compiled Code)
        at org.apache.tools.ant.Main.main(Compiled Code)
build complete!

-- If I switch to put the Ant-related jars first on the classpath, then get
this error:
build beginning...
java -classpath api\ant.jar;api\javac.jar;api\projectx-tr2.jar;.\build;;e:
\JDKs\jdk1.1.8\lib\classes.zip;e:\jdks\jsdk2.0\lib\jsdk.jar;..
\xml-xalan\xalan.jar;..\xml-xalan\bsf.jar;..\xml-xalan\bsfengines.jar;..
\xml-xerces\java\xerces.jar;..\xml4j\xml4j.jar org.apache.tools.ant.Main
footarget
Buildfile: build.xml
Detected Java Version: 1.1
Project base dir set to: E:\builds\testsuite
Executing Target: prepare
Created dir: E:\builds\testsuite\build
Executing Target: compile.prep
Compiling 10 source files to E:\builds\testsuite\build
java.lang.NoClassDefFoundError: java/util/ArrayList
        at sun.tools.util.CommandLine.parse(Compiled Code)
        at sun.tools.javac.Main.compile(Compiled Code)
        at org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Compiled
Code)
        at org.apache.tools.ant.taskdefs.Javac.execute(Compiled Code)
        at org.apache.tools.ant.Target.execute(Compiled Code)
        at org.apache.tools.ant.Project.runTarget(Project.java:471)
        at org.apache.tools.ant.Project.executeTarget(Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Compiled Code)
        at org.apache.tools.ant.Main.main(Compiled Code)
build complete!

Oh: Minor Ant Q?: Is there a --keep-going flag or equivalent yet?  (I know,
look at the docs!)

Any ideas?
----    ----
- Shane         Automation, Test, & Build guy
mailto:shane_curcuru@lotus.com    AIM:xsltest
  http://alphaworks.ibm.com/tech/LotusXSL
  http://xml.apache.org/xalan



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

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
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> --------------------

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

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
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-Mozilla-Status: 0009---------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------



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

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
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/>
--------------------------------------------------------------------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------



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

Posted by Andy Clark <an...@apache.org>.
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...