ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Nowostawski <mari...@marni.otago.ac.nz>
Subject Javac classic compiler problem?
Date Sun, 23 Jul 2000 01:44:44 GMT
I cannot recall somebody reporting it before. Has anybody got a clue what
may be the reason for this runtime exception? This happen for some, even
extremely small build files, when using the CVS ANT with Sun JDK1.3 on
Linux;  others JDKs (IBM 1.1.8, and Sun 1.2.2) seem to work fine.
Is it the faulty 'classic' compiler in JDK?  (wait.. I will check it ;o)

Yup.. I have rebuild my ANT with jikes, and it works fine now!
OK, so to sum up the problem seems to be:
if you compile the ANT distribution with normal (classic) compiler on
Linux, with JDK 1.2.2 (probably classic in 1.3 is faulty as well) you will
be unable to use such compiled ANT with your JDK1.3 because of the
exception below; strange, but it will work fine with jdk1.2.2

However, if you build your ANT with jikes or modern compiler, it will work
fine with all JDKs. I suspect the problem with the classic compiler is
caused by the bug with access to/from inner classes when mixed with
inheritance. I am sure it was fixed in modern compiler in jdk1.3 and I do
not recall that bug in jikes (at least since I wrote utility classes which
I could not compile with classic javac).

Maybe we should change build.compiler to jikes in standard ANT
distribution, as it seems ProjectHelper breaks with buggy classic
compiler? 
It might save some time of people using it on various JDKs, at least it
would have saved me about 45 minutes of stupid tracing whether my
build.xml has some non-ascii characters or not ;o)



build.xml is simply:

<?xml version="1.0"?>
<project name="myname" default="main" basedir=".">
<property name="name" value="123"/>
<property name="version" value="1.0"/>
<target name="main" />
</project>

$ ant
Buildfile: build.xml

BUILD FAILED

java.lang.VerifyError: (class: org/apache/tools/ant/ProjectHelper$TaskHandler, method: init
signature: (Ljava/lang/String;Lorg/xml/sax/AttributeList;)V) Illegal use of nonvirtual function
call
        at org.apache.tools.ant.ProjectHelper$ProjectHandler.startElement(ProjectHelper.java)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
        at com.sun.xml.parser.Parser.content(Parser.java:1499)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java)
        at org.apache.tools.ant.Main.runBuild(Main.java)
        at org.apache.tools.ant.Main.main(Main.java)



Mime
View raw message