Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 38926 invoked from network); 8 Oct 2003 06:18:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Oct 2003 06:18:07 -0000 Received: (qmail 64846 invoked by uid 500); 8 Oct 2003 06:17:46 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 64800 invoked by uid 500); 8 Oct 2003 06:17:46 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 64776 invoked from network); 8 Oct 2003 06:17:46 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 8 Oct 2003 06:17:46 -0000 Received: (qmail 38904 invoked from network); 8 Oct 2003 06:17:58 -0000 Received: from unknown (HELO apache.org) (127.0.0.1) by localhost with SMTP; 8 Oct 2003 06:17:58 -0000 Message-ID: <3F83AC11.8030405@apache.org> Date: Wed, 08 Oct 2003 08:17:53 +0200 From: Remy Maucherat User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: [5] Unable to initialize TldLocationsCache: zip file closed References: <3F831E64.4050204@joedog.org> In-Reply-To: <3F831E64.4050204@joedog.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Tim Funk wrote: > Quick summary: > > In o.a.jasper.xmlparserParserUtils.java, line 129 is > DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); > > Does anyone know how DocumentBuilderFactory.newInstance() can throw > "java.lang.IllegalStateException: zip file closed"? > > ==================== > More detail > ==================== > Tomcat 5.0.13 > Windows java 1.3.1_07 - All ok > HPUX - java 1.3.1.01 - I get the follow error during either the jsp > compile or the webapp init (not sure which yet) > > The error reported back to the web browser is ... > org.apache.jasper.JasperException: Unable to initialize > TldLocationsCache: zip file closed > at > org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:211) > > at > org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:181) > > > > Where the "fun" begins are the real stack traces. I added an extra > log.info() to TldLocationsCache to get the root stack trace because only > the message is being displayed and I get this as my stack trace ... > > [INFO] TldLocationsCache - -during init > closed>java.lang.IllegalStateException: zip file closed > at java.util.zip.ZipFile.getEntry(Unknown Source) > at java.util.jar.JarFile.getEntry(Unknown Source) > at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:76) > at > sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:96) > at > sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:108) > > at java.net.URL.openStream(Unknown Source) > at > org.apache.catalina.loader.StandardClassLoader.getResourceAsStream(StandardClassLoader.java:714) > > at > org.apache.catalina.loader.StandardClassLoader.getResourceAsStream(StandardClassLoader.java:696) > > at > org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1184) > > at javax.xml.parsers.SecuritySupport12$4.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at javax.xml.parsers.SecuritySupport12.getResourceAsStream(Unknown > Source) > at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown > Source) > at javax.xml.parsers.FactoryFinder.find(Unknown Source) > at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) > at > org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:129) > > at > org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:232) > > at > org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java: > ====== > > > Does anyone know how DocumentBuilderFactory.newInstance() can throw the > exception? (on a static initializer) > > Or is the solution just as simple as updating the JDK to a later 1.3? > (Unfortunatly a non-trivial effort) This happens when attempting to open a JAR from common/lib (or common/endorsed). This code hasn't changed for a long while. However, this CL (since it loads stuff which doesn't need to be updated) opens the URL without setting caches to false (BTW, whay isn't there a $%%$#%#%$#%$ global setting for this ???). I never got this error before. Maybe we should set the caches to false in StdCL.getResourceAsStream ? Does that fix it in your case ? Remy --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org