https://issues.apache.org/bugzilla/show_bug.cgi?id=49218

--- Comment #1 from Konstantin Kolinko <knst.koli...@gmail.com> 2010-04-29 
23:45:59 EDT ---
Re: "zip file closed"

Thanks to Peter Roßbach, I found that webapp-3.0-fragments webapp fails only
when it is run in a testcase.  If it is deployed on a standalone Tomcat 7
instance, it works.

After some thought I found the cause: the test runs successfully if I add
JreMemoryLeakPreventionListener to the configuration.

It sounds a bit weird, but so it is.  My speculation is that we somewhere close
the JarFile/ZipFile explicitly. The system-wide caching, that is turned off by
JreMemoryLeakPreventionListener, caches a JarFile when it is accessed through
URL. Explicitly closing the file closes the file in the cache, making it
unusable. 
I debugged it a bit, and the place where the JAR is closed is
WebappClassLoader#closeJARs() that is called as soon as web application startup
is completed.


As of now, I resolve this by adding JreMemoryLeakPreventionListener to the
testcase configuration.  Are there other ways to resolve this, e.g. to somehow
change how the resource JARs are handled?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to