"Error instantiating servlet class <servlet class name>" This exception message is printed in the log file when a class used by a servlet cannot be instantiated. The developer will eventually be able to guess the class and add it to the classes/jars directory under [install-dir]/shared/. However, the class loader should print in its error message the name of the class that it cannot find. The curent error message is misleading, as the missing class NOT the servlet class that is printed in the message. How to reproduce: - Write a servlet that uses a class that is not part of the JRE and not part of the classes supplied by Tomcat. - Try to load your servlet.
Hmm, I'm actually a little bit confused as to why ths happens. If you look at StandardWrapper line 1060 or so, the exception is properly thrown with the root caused attached, so a full stack trace should print out. I added a log.debug statement to make sure the full stack trace is in the log anyways.
Perhaps this is the problem: public ServletException(String message, Throwable rootCause) { super(message); this.rootCause = rootCause; } It's still in the latest svn revision (assuming this is the trunk): http://svn.apache.org/repos/asf/tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr154/src/share/javax/servlet/ServletException.java
I have tested this with the latest code from svn and the stack trace is displayed as expected.