Bug 47878 - Deleting JSP file results in a permanent 500 Error, FileNotFound.
Summary: Deleting JSP file results in a permanent 500 Error, FileNotFound.
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.5.28
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2009-09-20 05:40 UTC by Colin Lear
Modified: 2010-05-25 22:33 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Colin Lear 2009-09-20 05:40:28 UTC
Exists in both 5.5.27 and 5.5.28.

It's easy to test. Just create test.jsp in the jsp-examples folder, and load it in the browser. Then delete or move the file and reload until you get an error.

That url forever throws a FileNotFound Exception. Recreating the file doesn't fix the problem.

I think the fix to Bug 2500. Revision 562749 removed the call to ctxt.incrementRemoved(). This means the compiler context is not cleaned up when the file is removed.

The patch probably should have still caught the FileNotFoundException and then just handled it identical to a normal Exception.

However since I don't have a Java 1.5 box right at this minute to compile the source, I can't test this.
Comment 1 Mark Thomas 2009-09-20 08:54:00 UTC
Thanks for the report. Testing on 6.0.x and trunk showed that this was not an issue for those versions. A little research suggested that r439565 needed to be back-ported to 5.5.x to fix this issue.

I've tested this and it does indeed fix the issue. I have proposed r439565 for back-port to 5.5.x.
Comment 2 Konstantin Kolinko 2010-05-25 22:33:18 UTC
Fixed in 5.5 in r948294. Will be in 5.5.30 onwards.