DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32248>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32248 Summary: STRUTS Application still services requests although ActionServlet failed to initialize. Product: Struts Version: 1.1 Final Platform: All OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Controller AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have a struts 1.1 app with a typical default index.jsp redirecting to the entry point action: <logic:redirect forward="/startForm3"/> This was failing to because of the following NPE: --- java.lang.NullPointerException at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:396) at org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:294) --- I can see from a quick google that this is a frequently experienced problem and yet I have not seen a satisfactory solution. If we look into the RequestUtils code we find that the problem is that the ModuleConfig cannot be found on either the request or in the application context. When the forward config for the string in the jsp is looked up we therfore get the NPE. If we look into the container logs we find the root cause: the ActionServlet failed to load: --- javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:986) ... ----- Root Cause ----- java.lang.NoClassDefFoundError: javax/sql/DataSource at java.lang.ClassLoader.defineClass0(Native Method) --- One assumes that the ActionServlet did not load the ModuleConfig, and that the application is *not* therefore really viable - although it seems to think it is... My question is, should the application be attempting to service requests if its central component failed to boot correctly? The side effects this causes are hard to diagnose and I suggest that it would be better if, in situations like this, all further requests were responded to with an Error 500 and the stacktrace for the original problem - or something similar. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]