You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Tim Funk <fu...@joedog.org> on 2003/10/07 22:13:24 UTC
[5] Unable to initialize TldLocationsCache: zip file closed
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: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)
-Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: [5] Unable to initialize TldLocationsCache: zip file closed
Posted by Tim Funk <fu...@joedog.org>.
I was testing on 1.3. (Just an old 1.3) I meant to say I should attempt to
upgrade to a newer 1.3 JVM. I think I can have a test box with 1.4 late next
week if I sweet talk the right people.
For this particular config, I haven't tried running tomcat 4.1 on it. It
might be interesting to try.
Since the specs(at my latest reading) require a minimum of a 1.3 jvm, I am
not worried about a 1.2 jvm.
-Tim
Remy Maucherat wrote:
> Tim Funk wrote:
>> My first todo will be to get a newer JVM (1.3 or 1.4) for that machine
>> and see how things go. I am not going to pull my hair out on this one
>> until I can reproduce this with a newer JVM for that box. (Something
>> I'll not be allowed to do soon for that machine :( )
>
>
> Ok. BTW, I never test anything anymore on JDK 1.2. So maybe there are
> issues.
>
> Would it be a newly introduced bug, or was it present before ?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: [5] Unable to initialize TldLocationsCache: zip file closed
Posted by Remy Maucherat <re...@apache.org>.
Tim Funk wrote:
> No luck. I have had trouble in the past with HP JVMs and this is an old
> JVM.
>
> No errors are output when the webapp is loaded. Just when the first JSP
> tries to get compiled.
>
> As a sanity check, I removed the precompile mappings for the JSP
> examples and most examples worked fine. But then one of the pages got an
> error (jsp-examples/xml/xml.jsp), then nothing worked for jsp-examples.
> I deleted work/Catalina/localhost/jsp-examples/ and had multiple tomcat
> restarts with no luck.
>
> My first todo will be to get a newer JVM (1.3 or 1.4) for that machine
> and see how things go. I am not going to pull my hair out on this one
> until I can reproduce this with a newer JVM for that box. (Something
> I'll not be allowed to do soon for that machine :( )
Ok. BTW, I never test anything anymore on JDK 1.2. So maybe there are
issues.
Would it be a newly introduced bug, or was it present before ?
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: [5] Unable to initialize TldLocationsCache: zip file closed
Posted by Tim Funk <fu...@joedog.org>.
No luck. I have had trouble in the past with HP JVMs and this is an old JVM.
No errors are output when the webapp is loaded. Just when the first JSP tries
to get compiled.
As a sanity check, I removed the precompile mappings for the JSP examples and
most examples worked fine. But then one of the pages got an error
(jsp-examples/xml/xml.jsp), then nothing worked for jsp-examples. I deleted
work/Catalina/localhost/jsp-examples/ and had multiple tomcat restarts with
no luck.
My first todo will be to get a newer JVM (1.3 or 1.4) for that machine and
see how things go. I am not going to pull my hair out on this one until I can
reproduce this with a newer JVM for that box. (Something I'll not be allowed
to do soon for that machine :( )
-Tim
Remy Maucherat wrote:
> 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"?
> 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 ?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: [5] Unable to initialize TldLocationsCache: zip file closed
Posted by Remy Maucherat <re...@apache.org>.
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
> <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: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