Bug 22096 - reload through manager webapp fails to redeploy classes/jars
Summary: reload through manager webapp fails to redeploy classes/jars
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Webapps:Manager (show other bugs)
Version: 4.1.31
Hardware: Other Windows Server 2003
: P3 critical (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
: 22149 22154 23506 23565 23809 24121 (view as bug list)
Depends on:
Reported: 2003-08-03 23:06 UTC by David Rees
Modified: 2004-12-23 03:35 UTC (History)
5 users (show)


Note You need to log in before you can comment on or make changes to this bug.
Description David Rees 2003-08-03 23:06:39 UTC
I just noticed that when reloading a context using the manager application,
Tomcat fails to redeploy WEB-INF/lib and the WEB-INF/classses for that web
application leading to ClassNotFoundExceptions.

Using stop and then start works fine.
Comment 1 Laurent Blume 2003-08-04 14:39:35 UTC
I confirm I have that exact problem, both on 4.1.26 that I installed last
Friday, and on 4.1.27 that I installed today.
Previous version was 4.1.24, which was working fine.
Configuration was left the same.

I'm not sure about it, but I was surprised to see that in the exception report:
C:\TEMP\index_jsp.java:99: cannot resolve symbol

I though Tomcat put all its temporary stuff in the work/directort.
I couldn't find any temporary JSP dating from 4.1.24 in TEMP.
Comment 2 Remy Maucherat 2003-08-04 17:27:14 UTC
I don't know yet when this bug was introduced, and will look into the issue.
Comment 3 Peter Rossbach 2003-08-05 09:14:00 UTC

I look to StandardContext implementation and found to changes between 4.1.24 
and 4.1.27


Line 1062

public ServletContext getServletContext() {

     return (context) ;

Line 1062

public ServletContext getServletContext() {

     return (context.getFacade()) ;


other change is at Line 3363:

public synchronized stop() ...

// add listenerStop
-- nothing to with current 4.1.x reloading.

I extract the 4.1.24 org.apache.catalina.core.StandardContext and copy to 
4.1.27 server/classes.

Jiep, 4.1.27 reloading working as expected. Testet with a hello world directory 

The first change are a internal security fix, but has current a side effect...

Comment 4 Remy Maucherat 2003-08-05 09:41:20 UTC
Thanks for the analysis, and finding out what was causing the issue. I wouldn't
have gone in that direction, instead I was suspecting my change to fix STM and
webapp reload (I thought it would have caused the wrapper reload to fail).
Instead, the safe looking one line change to return a facaded servlet context is
what broke reloading. I assume the ContextConfig listener could no longer reset
necessary components in the servlet context once the facade was in place.
I will make a hotfix available for this bug, and I assume a new 4.1.x release
will occur before the end of the month.
Comment 5 Remy Maucherat 2003-08-05 09:57:47 UTC
Done. I added a hotfix package there:
Check it just to make sure I didn't make any mistakes.
Comment 6 Laurent Blume 2003-08-05 10:29:04 UTC
Works for me!

Thanks a lot!
Comment 7 David Rees 2003-08-05 19:08:11 UTC
Yep, works for me, too.
Comment 8 Remy Maucherat 2003-08-05 19:11:47 UTC
Ok, thanks. I will post to announcements tomorrow, once the mirrors have synced.
I believe the HTML contains explicit enough instructions and details to allow
4.1.27 to live on for a little while, given this is not a security issue.
Comment 9 Tim Funk 2003-08-05 21:13:17 UTC
*** Bug 22149 has been marked as a duplicate of this bug. ***
Comment 10 David Rees 2003-08-06 02:49:31 UTC
*** Bug 22154 has been marked as a duplicate of this bug. ***
Comment 11 Tim Funk 2003-09-30 10:49:26 UTC
*** Bug 23506 has been marked as a duplicate of this bug. ***
Comment 12 David Rees 2003-10-02 15:51:02 UTC
*** Bug 23565 has been marked as a duplicate of this bug. ***
Comment 13 Tim Funk 2003-10-14 14:26:15 UTC
*** Bug 23809 has been marked as a duplicate of this bug. ***
Comment 14 Tim Funk 2003-10-25 19:06:22 UTC
*** Bug 24121 has been marked as a duplicate of this bug. ***