Grokbase Groups Ant user March 2003
FAQ
Using Java 1.3.1 on AIX 5.2, I get a ZipException during the build process.
Normally I'd think it's a path/classpath problem, but here the rest of the
build completes successfully. Running Ant with the -debug flag, the
exception occurs after the lines

Apache Ant version 1.5.1 compiled on October 2 2002
Buildfile: build.xml

but before the line

Detected Java version: 1.3 in: /usr/java131/jre

After that, as I said, build completes successfully. My project doesn't use
any zip files, and the error seems to occur while Ant is "setting up"--i.e.,
before processing my stuff--so I'm not sure what file it's trying to open.
Does anyone know?

A similar question was asked a while back
(http://archives.apache.org/eyebrowse/ReadMsg?listName=user@ant.apache.org&m
sgNo=7271) but didn't get a response. Any help is appreciated.

My stack trace err msg follows:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(JarFile.java:138)
at java.util.jar.JarFile.(URLClassPath.java:526)
at sun.misc.URLClassPath$JarLoader.(URLClassPath.java:287)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java(Compiled Code))
at sun.misc.URLClassPath.getLoader(URLClassPath.java(Compiled Code))
at sun.misc.URLClassPath.getResource(URLClassPath.java:162)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:675)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:238)
at java.lang.ClassLoader.loadClass(ClassLoader.java:514)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:446)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at
org.apache.tools.ant.util.JavaEnvUtils.(Main.java:567)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)

Search Discussions

  • Stefan Bodewig at Mar 24, 2003 at 4:46 pm

    On Mon, 24 Mar 2003, Tom Murphy wrote:

    My project doesn't use any zip files,
    jar files are zip-files.
    and the error seems to occur while Ant is "setting up"
    It looks as if a jar on your CLASSPATH was corrupt.
    I'm not sure what file it's trying to open.
    I'm not familiar enough with AIX. On Linux or Solaris I'd use strace
    to see which files Java touches, but according to
    <http://www.unixporting.com/quickguide.html>, strace is not available
    for AIX (and AIX ships with a command named strace that does something
    different).

    The stacktrace shows that the exception occurs while loading a class
    via the system classloader, so it must be something on your CLASSPATH
    (note that all jars in ANT_HOME/lib are being put onto your CLASSPATH
    automatically).

    Stefan
  • Murphy, Tom (T06) at Mar 24, 2003 at 5:21 pm
    A thousand thanks.

    Commented out everything in my classpath except for "." then started adding
    things back in one by one, running ant with each new classpath, until I
    found the guilty party (an unrelated jar--the classpath entry for this item
    did not reflect the jar's updated package structure). Anyway, problem
    solved--thanks. Thanks also for the reminder that Ant puts ANT_HOME/lib
    jars on classpath automatically.



    -----Original Message-----
    From: Stefan Bodewig
    Sent: Monday, March 24, 2003 11:46 AM
    To: user@ant.apache.org
    Subject: Re: Zip Exception during build, but build completes
    successfully

    On Mon, 24 Mar 2003, Tom Murphy wrote:

    My project doesn't use any zip files,
    jar files are zip-files.
    and the error seems to occur while Ant is "setting up"
    It looks as if a jar on your CLASSPATH was corrupt.
    I'm not sure what file it's trying to open.
    I'm not familiar enough with AIX. On Linux or Solaris I'd use strace
    to see which files Java touches, but according to
    <http://www.unixporting.com/quickguide.html>, strace is not available
    for AIX (and AIX ships with a command named strace that does something
    different).

    The stacktrace shows that the exception occurs while loading a class
    via the system classloader, so it must be something on your CLASSPATH
    (note that all jars in ANT_HOME/lib are being put onto your CLASSPATH
    automatically).

    Stefan

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
    For additional commands, e-mail: user-help@ant.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesant
postedMar 24, '03 at 4:30p
activeMar 24, '03 at 5:21p
posts3
users2
websiteant.apache.org

People

Translate

site design / logo © 2022 Grokbase