tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Abrams <jonathanabr...@gmail.com>
Subject JasperException and ClassNotFoundException when Tomcat is restarted
Date Mon, 06 Apr 2009 20:32:24 GMT
Hi all, does anyone else ever see weird compile and IO errors when
Tomcat is restarted under load, in response to HTTP requests from
robots?

We have a JSP/Servlet based site running multiple Apache Tomcat 5.5
servers on Linux.

We set reloadable to false in our server.xml, and when we update our
code, we push the new code and then restart each app server (we have
several servers running Tomcat 5.5 behind a load balancer).

During these restarts, we intermittently see JasperException compiling
JSPs, ClassNotFoundExceptions on tag files, and IOExceptions on
tmpFile.renameTo(classFile).

These weird exceptions occur ONLY when we are starting up our servers
again.  At all other times, our Tomcat servers run fine with no
similar exceptions.

I've also noticed that most of these exceptions occur for HTTP
requests with user agents for  Yahoo Slurp, GoogleBot, or curl,
indicating that it is a robot hitting our site so quickly and so soon
after the Tomcat servers are restarted.  But shouldn't Tomcat block
any HTTP requests until it is actually ready to process them without
any weird compile errors?

Here are examples of these intermittent exceptions that we see during
these startup windows:

org.apache.jasper.JasperException: Unable to compile class for JSP
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
28)
at
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
63)


java.lang.ClassNotFoundException: org.apache.jsp.tag.web.error_tag
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
at
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
at
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.ja
va:219)
at
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.jav
a:515)
at
org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java
:48)


java.io.IOException: tmpFile.renameTo(classFile) failed
at
org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:245)
at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:164)
at
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:429)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
63)

Thank you if you have any idea what is causing this or how to get
Tomcat to wait until it is ready before responding to HTTP requests.

Jonathan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message