tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chatree Srichart <chatree.srich...@gmail.com>
Subject Standard Jar Scanner Conflict with TLD Config
Date Wed, 23 Nov 2011 09:52:27 GMT
Hi community.

I got a problem when I start my own embedded Tomcat server with a lot of
JAR files in classpath. 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?

Regards,
Chatree Srichart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message