Opened 17 years ago
Closed 16 years ago
#1041 closed defect (fixed)
ZipException: error in opening zip file in JarClassLoader if a JAR file given on class path doesn't exists
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.8 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
Here is the interesting parts of the stacktrace:
14:37:31,384 ERROR ExtensionsFile:425 - Error loading extensions from JAR file: /home/auster/nicklas/program/tomcat/webapps/base2/WEB-INF/extensions/base-ftpserver.jar 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:114) at java.util.jar.JarFile.<init>(JarFile.java:133) at java.util.jar.JarFile.<init>(JarFile.java:97) at net.sf.basedb.util.JarClassLoader.loadJarFile(JarClassLoader.java:269) at net.sf.basedb.util.JarClassLoader.loadJarFile(JarClassLoader.java:297) at net.sf.basedb.util.JarClassLoader.<init>(JarClassLoader.java:205) at net.sf.basedb.util.JarClassLoader.getInstance(JarClassLoader.java:117) at net.sf.basedb.clients.web.extensions.ExtensionsFile.loadJar(ExtensionsFile.java:420)
The starting JAR file passed to JarClassLoader.getInstance() has a MANIFEST.MF
file where the Class-Path
entry lists a non-existing file. The call loadJarFile(JarClassLoader.java:297)
is a recursive call to load the non-existing file which fails. I think non-existing files should be ignored and maybe a warning-level message should be logged.
Change History (4)
comment:1 by , 17 years ago
Status: | new → assigned |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This fix was broken by #1043. The JarClassLoader should not throw an exception if a listed JAR file is missing.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
(In [4389]) Fixes #1041: ZipException: error in opening zip file in JarClassLoader if a JAR file given on class path doesn't exists
(In [4321]) Fixes #1041: ZipException: error in opening zip file in JarClassLoader if a JAR file given on class path doesn't exists