DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6738>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6738 DependClassLoader12 choking on Manifests Summary: DependClassLoader12 choking on Manifests Product: Tomcat 3 Version: 3.3.1 Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] DependClassLoader12 is not getting the proper Manifest information in the defineClassCompat(...) method. It seems that the return value from String JarN = res.getFile() is not a proper filename -- instead it returns a File URL with a suffixed reference that can be used to resolve a specific JarEntry (something like file:D:/foo/WEB-INF/lib/jndi.jar!/javax/naming/NamingException.class). I don't know if this String format should really be considered a canonical form but, if it is, a possible fix is to remove the "file:" prefix and any content following "!": --- DependClassLoader12.java.orig Wed Feb 27 12:33:03 2002 +++ DependClassLoader12.java Wed Feb 27 12:54:53 2002 @@ -70,6 +70,10 @@ * */ public class DependClassLoader12 extends DependClassLoader { + + private final static String FILE_PROTOCOL = "file:"; + private final static String BANG = "!"; + DependClassLoader12() { } @@ -115,7 +119,9 @@ if ( "jar".equals(res.getProtocol()) ) { try { String JarN = res.getFile(); - System.out.println(JarN); + if (JarN.startsWith(FILE_PROTOCOL)) JarN = JarN.substring (FILE_PROTOCOL.length()); + int bang = JarN.indexOf(BANG); + if (bang != -1) JarN = JarN.substring(0, bang); JarFile JarF = new JarFile(JarN); Manifest mf = JarF.getManifest(); if(mf == null) // Jar may not be Java2 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
