Search code examples
javamacosziposx-snow-leopard

ZipException in Eclipse thrown all the time


Since this morning (i've updated some plugins, and updated mac os X) I get a ZipException, any time the system wants to read a jar/zip file. At first I thought it was a bug in the new version of the plugin, but it seems to be pretty low level, in the native java.util.zip.Zipfile.open(..) method.

Error: Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)

Anyone have any idea where this comes from? Anyone experiencing the same problem? I am using Eclipse Galileo.

My java -version says:

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)

I've checked the dirs of the files that contain some of the jars that are being opened, for instance /System/Library/Java/Extensions/AppleScriptEngine.jar:

$> ls -l
-rwxrwxrwx  1 root  wheel     6470 Jan  6  2010 AppleScriptEngine.jar

It drives me crazy, cos a lot of plugins are now failing. Any hints are very very welcome!

(Using Mac OS X 10.6.8)


Solution

  • For some reason it needed to open a .jar file that was 0 bytes. This caused the error. Why it wasn't happening before, I don't know, but simply removing the whole file did the trick. I think something got updated and now it does some sort of directory scan, trying to open every .jar file it can find.