I need help figuring out why several of my web applications periodically throw 404 errors when trying to create a JSP. One of them has a JSP that is accessed directly, and the other a servlet that forwards the JSP. Pages work most of the time, but sometimes they will throw 404. If a user refreshes his browser 1-3 times, the page starts working again without any changes.
The following is an example of an error visible in a web browser (Chrome): type: Status report message: /app_root/my_page.jsp description: The requested resource is not available
The problem seems to be due to recompilation of JSP pages. The .war file and extended directory are not modified. There are always three errors in the logs corresponding to each 404 error: WARNING: Failed to delete generated class file [D:\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\app_root\org\apache\jsp\my_005fpage_jsp.class] May 19, 2015 6:32:24 AM org.apache.jasper.compiler.Compiler removeGeneratedFiles WARNING: Failed to delete generated Java file [D:\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\app_root\org\apache\jsp\my_005fpage_jsp.java] May 19, 2015 6:32:24 AM org.apache.jasper.compiler.Compiler generateJava WARNING: Failed to delete generated Java file [D:\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\app_root\org\apache\jsp\my_005fpage_jsp.java]
I am running Java 1.7 on Tomcat 7.0.53. Tomcat runs on a Windows 2008 R2 server.
Here is what I have tried so far, based on the information I found from Google. However, 404 continues.
- Disabled Windows indexing in the entire Tomcat directory
- Disable development mode in my production environment
- Increased TestInterval modification in my default QA environment (4 seconds) to 3600 (1 hour) [Note: it is currently set to 0 to help me reproduce the problem]
- The owner in the Tomcat working directory has been changed as the same identifier as the identifier that runs in the service.
I run an antivirus that is disabled in the working directory to see if this helps.
While this problem occurs on my prod and QA servers, this does not happen for me on my local Tomcat instance. In fact, I have not yet seen a problem with my workstation, even when running QA and Prod applications. This question was seen only by other people.
Spiritis
source share