tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kin-Man Chung <Kin-Man.Ch...@Eng.Sun.COM>
Subject Re: [5] Unable to initialize TldLocationsCache: zip file closed
Date Tue, 07 Oct 2003 23:01:17 GMT
I have encountered such message in a number of occasions, usually related
to reading a jar file from cache.  This is likely a VM bug and the work-
around is usually to not use cache after opening a JarURLconnection.

The stack trace seems to indicate that this happens when reading web.xml.
Did you replace the .war file after it has been deployed?  Or maybe you
can deploy the war unpacked?

-Kin-man


> Date: Tue, 07 Oct 2003 16:13:24 -0400
> From: Tim Funk <funkman@joedog.org>
> Subject: [5] Unable to initialize TldLocationsCache: zip file closed
> To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> 
> 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 <java.lang.IllegalStateException: zip 
> file 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:1
08)
> 	at java.net.URL.openStream(Unknown Source)
> 	at 
> 
org.apache.catalina.loader.StandardClassLoader.getResourceAsStream(StandardClass
Loader.java:714)
> 	at 
> 
org.apache.catalina.loader.StandardClassLoader.getResourceAsStream(StandardClass
Loader.java:696)
> 	at 
> 
org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(WebappClassLoad
er.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)
> 
> -Tim
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message