Hello,
I tried to submit this to BugRat, but got a ServletException:
java.lang.NoClassDefFoundError: javax/activation/DataSource at
org.gjt.bugrat.servlet.BugRatReport.processReportPOST(Compiled Code)
Anyway,
I ran into a little problem with Tomcat 3.2 final: it's so much a bug as an
ambiguous
error message which made it a *real* PITA to run down the real problem. The
problem
turned out to be that I had a broken symlink to a jar file in my
WEB-INF/lib directory
(the symlink was in that directory, not the target).
When the jar file can't be opened, an exception is thrown by
AdapativeClassLoader
and caught by LoadOnStartupInterceptor, but the only message printed is that
the servlet can't be loaded. The jar file may well have nothing to do with the
servlet being loaded: in my case, the error printed to stdout after Tomcat's
startup was: "cannot load servlet name: jsp"
I propose that LoadOnStartupInterceptor be modified to print the message
from the Exception which is caught:
src/share/org/apache/tomcat/context/LoadOnStartupInterceptor.java
*** 132,136 ****
} catch (Exception ee) {
String msg = sm.getString("context.loadServlet.e",
! servletName);
System.out.println(msg);
}
--- 132,136 ----
} catch (Exception ee) {
String msg = sm.getString("context.loadServlet.e",
! servletName) + ": " +
ee.getMessage();
System.out.println(msg);
}
It looks like there are a fair number of other errors which can be thrown
when a servlet is loaded, so this should be more generally useful than
my specific case.
Here's a patch, sorry if it's not in the proper format.
134c134
< servletName);
---
> servletName) + ": " +
ee.getMessage();
Kief
---
bitBull makes the Internet bite: http://www.bitBull.com/demos/