On 23.11.2011 22:59, Mark Thomas wrote:
On 23/11/2011 09:52, Chatree Srichart wrote:
Hi community.
I got a problem when I start my own embedded Tomcat server with a lot of
JAR files in classpath.
Really in classpath used by the system loader? Or do you simply mean
using many JAR files (in WEB-INF/lib)?
Do you have multiple webapps deployed in the same Tomcat instance? Does
the problem also happen when only one webapp is deployed?
Finally: which version of Tomcat do you use?
I got this error message for some jar files:
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:403)
at java.util.zip.ZipFile.access$100(ZipFile.java:29)
at java.util.zip.ZipFile$2.hasMoreElements(ZipFile.java:303)
at java.util.jar.JarFile$1.hasMoreElements(JarFile.java:220)
at org.apache.tomcat.util.scan.FileUrlJar.nextEntry(FileUrlJar.java:75)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:482)
at org.apache.catalina.startup.TldConfig.access$100(TldConfig.java:58)
at
org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:276)
at
org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241)
at
org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:204)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:250)
at
org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5041)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:844)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:820)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:644)
I see a conflict in the trunk version (Revision: 1205335) when
FileUrlJar#nextEntry() method try to call this statement:
FileUrlJar.java:75
=================
entries.hasMoreElements()
after TldConfig#tldScanJar() method has been called and the jar has been
closed:
TldConfig.java:489
=================
jar.close();
Let's say the system is trying to use closed JAR file.
Could you please tell me how to solve or ignore the problem?
That shouldn't happen. The Jar should be opened, scanned and then
closed. If you have a reproducible test case for this issue (which
should be as small and as simple as possible) then please create a
Bugzilla entry for the bug and add the test case.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org