You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Walend <dw...@eecs.tufts.edu> on 2000/12/28 17:24:45 UTC
fork javac
I am using ant to build multiple jar files in the same ant run. I've
got a .jar of
interfaces, then a .jar of implementation, and last a .jar of tests.
If I change an interface, then javac/ant crashes while compiling the
implementation classes with an "ArrayIndexOutOfBoundsError" and advice to
mail the JDC bug list for help.
I think the problem is that ant loads up old versions of the classes with
its own ClassLoader, then is stuck with the old versions for the rest of
the ant run.
I fork all my junit tasks to new jvms. I'd like to do the same for my
javac tasks. I think that will be an easy fix for the problem. But the
javac task doesn't support fork="yes".
Is there an easy way to fork javac?
If you need to see source code, the whole project including the build.xml
is up on http://lyophilizer.sourceforge.net. It's not yet fit for human
consumption, so please don't be too critical.
Thanks,
Dave
------------------------------------------------------------------------------
David Forrest Walend
Tufts dwalend@cs.tufts.edu
ICBM 41.8411 N -71.3912 W R+61m H
------------------------------------------------------------------------------
"Text processing has made it possible to right-justify any idea, even one
which cannot be justified on any other grounds."
-- J. Finnegan, USC.
------------------------------------------------------------------------------
Re: fork javac
Posted by David Walend <dw...@eecs.tufts.edu>.
On Fri, 29 Dec 2000, Nico Seessle wrote:
> ----- Original Message -----
> *My* problem is
>
> C:\Java\lyophilizer\source\build.xml:383: Next character must be ">"
> terminating comment .
>
> Which comes from the line at the end of the buildfile containing these
> "--...--". Is this the buildfile you are reporting your problem on?
Oh... Thanks for pointing that out. I copy the license and contact info in
as part of the build. So that build file is a lot like the one I use,
except for the license with the xml syntax error at the bottom. Being a
bit too clever I guess.
Please pull in a new copy of the source code. To repeat the error,
you'll have to run "ant lyophil-ejb11" the first time, then change the
api in Freezer.java in the lyophil package, change EJB11Freezer in the
lyophil.ejb11 package to match, then run the build again. Assuming our
class paths match up reasonably well, that should uncover the error.
Does anyone know of a way to fork the javac task?
Thanks,
Dave
Re: fork javac
Posted by Nico Seessle <Ni...@epost.de>.
----- Original Message -----
From: "David Walend" <dw...@eecs.tufts.edu>
To: <an...@jakarta.apache.org>
Sent: Thursday, December 28, 2000 9:30 PM
Subject: Re: fork javac
> On Thu, 28 Dec 2000, Nico Seessle wrote:
> > > If I change an interface, then javac/ant crashes while compiling the
> > > implementation classes with an "ArrayIndexOutOfBoundsError" and advice
to
> > > mail the JDC bug list for help.
> > Warning: Class org.apache.tools.ant.taskdefs.optional.FTP could not be
> > found - t
> > ask ftp not defined.
>
> I think you need to add the optional tasks to the class path inside
> the ant executable. At least the P4sync task isn't where ant is looking.
> Mine's
OK, I should have cut this from my output... this results from loading
task-libaries in case a support-library is not available. Since the tasks
ftp and p4sync are not needed for your build.xml this should not be a
problem I think.
*My* problem is
C:\Java\lyophilizer\source\build.xml:383: Next character must be ">"
terminating comment .
Which comes from the line at the end of the buildfile containing these
"--...--". Is this the buildfile you are reporting your problem on?
Nico
Re: fork javac
Posted by David Walend <dw...@eecs.tufts.edu>.
On Thu, 28 Dec 2000, Nico Seessle wrote:
> > If I change an interface, then javac/ant crashes while compiling the
> > implementation classes with an "ArrayIndexOutOfBoundsError" and advice to
> > mail the JDC bug list for help.
> I wanted to test this on my system but I get:
>
> C:\Java\lyophilizer\source>ant
> Buildfile: build.xml
> Warning: Class org.apache.tools.ant.taskdefs.optional.FTP could not be
> found - t
> ask ftp not defined.
Nico,
I think you need to add the optional tasks to the class path inside
the ant executable. At least the P4sync task isn't where ant is looking.
Mine's
LOCALCLASSPATH=/usr/share/java/ant.jar:/usr/share/java/jaxp.jar:/usr/share/java/
parser.jar:/usr/share/java/optional.jar:/usr/local/java/junit/junit.jar
You'll have to translate it for windows. (I don't know how to do that.)
> Warning: Class org.apache.tools.ant.taskdefs.optional.perforce.P4sync could
> not
> be found - task perforce not defined.
>
> BUILD FAILED
I get
lyophil-ejb11:
Compiling 1 source file to
/home/dwalend/opensource/lyophilizer/build/lyophil-ejb11
An exception has occurred in the compiler (1.3.0). Please file a bug at
the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi).
Include your program and the following diagnostic in your report. Thank
you.
java.lang.InternalError: jzentry == 0
at java.util.zip.ZipFile$2.nextElement(ZipFile.java:297)
at
com.sun.tools.javac.v8.code.ClassReader.openArchive(ClassReader.java:893)
at
com.sun.tools.javac.v8.code.ClassReader.list(ClassReader.java:1095)
at
com.sun.tools.javac.v8.code.ClassReader.listAll(ClassReader.java:1180)
at
com.sun.tools.javac.v8.code.ClassReader.fillIn(ClassReader.java:1202)
at
com.sun.tools.javac.v8.code.ClassReader.complete(ClassReader.java:955)
at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:366)
at com.sun.tools.javac.v8.comp.Enter._case(Enter.java:424)
at com.sun.tools.javac.v8.tree.Tree$TopLevel.visit(Tree.java:349)
at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:392)
at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:410)
at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:540)
at
com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:357)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.compile(Main.java:26)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tools.ant.taskdefs.Javac.doModernCompile(Javac.java)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java)
at org.apache.tools.ant.Target.execute(Target.java)
at org.apache.tools.ant.Project.runTarget(Project.java)
at org.apache.tools.ant.Project.executeTarget(Project.java)
at org.apache.tools.ant.Project.executeTargets(Project.java)
at org.apache.tools.ant.Main.runBuild(Main.java)
at org.apache.tools.ant.Main.main(Main.java)
BUILD FAILED
I fix it by rerunning ant, and it works fine. If I can figure out how to
fork javac, I think that it will be fixed. Does anyone know how?
Thanks,
Dave
Re: fork javac
Posted by Nico Seessle <Ni...@epost.de>.
----- Original Message -----
From: "David Walend" <dw...@eecs.tufts.edu>
To: <an...@jakarta.apache.org>
Sent: Thursday, December 28, 2000 5:24 PM
Subject: fork javac
> If I change an interface, then javac/ant crashes while compiling the
> implementation classes with an "ArrayIndexOutOfBoundsError" and advice to
> mail the JDC bug list for help.
I wanted to test this on my system but I get:
C:\Java\lyophilizer\source>ant
Buildfile: build.xml
Warning: Class org.apache.tools.ant.taskdefs.optional.FTP could not be
found - t
ask ftp not defined.
Warning: Class org.apache.tools.ant.taskdefs.optional.perforce.P4sync could
not
be found - task perforce not defined.
BUILD FAILED
C:\Java\lyophilizer\source\build.xml:383: Next character must be ">"
terminating
comment .
Total time: 1 second
C:\Java\lyophilizer\source>
Is this the build.xml which gives you trouble?
Nico