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


Joe Kislo <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #7 from Joe Kislo <[EMAIL PROTECTED]>  2008-05-22 16:12:38 PST ---
Sorry for the delay testing the fix... It's been a busy couple of weeks.

So I checked out the code from svn trunk today (05-22-08) and tested it.  With
the test case I provided, everything was good... However when I tested it with
a more thorough test case (EG: a real web application :) ), i ran into some
crashes implying I was using an the OLD classloader.  

It seems like the Thread that is calling the init() function has the *wrong*
classloader attached to it (EG: the old servlet's class loader, instead of the
new one).  I've narrowed down the issue (this... took some time :) ) and have a
new test case for you.

Just replace the ServletRestartTest.war file with this new one (and re-extract
it).  There are now two classes, the ServletRestartTest servlet itself, and
another class (it happens to be blank) that I will try to load using the
Classloader.

Do the same test as before... run:
ab -c 10 -n 100 http://localhost:8080/ServletRestartTest/ServletRestartTest

then query the reload by going to this url at the same time:
http://localhost:8080/manager/reload?path=/ServletRestartTest

You'll see this:
[...]
servicing completed
servicing completed
destroy starting
destroy completed
init starting
May 22, 2008 7:02:13 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. 
Could not load OtherClass.  The eventual following stack trace is caused by an
error thrown for debugging purposes as well as to attempt to terminate the
thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at ServletRestartTest.init(ServletRestartTest.java:24)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
        at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:183)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
init completed
starting servicing
[...]

Let me know if I can be of any further assistance


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to