Hi, We're currently getting quite a few stack dumps in our production application (like the one at the bottom of this e-mail) where there is no stack information indicating where a Null Pointer Exception occurred. Instead, all we see is where the RequestProcessor (Struts 1.1) threw a new exception. Originally, I assumed the NPE occurred somewhere in our presentation or business tier classes. But looking at the Struts code, it looks like Struts may have been unable to execute the specified action (code snippets from RequestProcessor) object: protected ActionForward processActionPerform(...) throws IOException, ServletException { try { return (action.execute(mapping, form, request, response)); } catch (Exception e) { return (processException(request, response, e, form, mapping)); } } protected ActionForward processException(...) throws IOException, ServletException { // Is there a defined handler for this exception? ExceptionConfig config = mapping.findException(exception.getClass()); if (config == null) { log.warn(getInternal().getMessage("unhandledException", exception.getClass())); if (exception instanceof IOException) { throw (IOException) exception; } else if (exception instanceof ServletException) { throw (ServletException) exception; } else { throw new ServletException(exception); <-- New exception being thrown here??? } } // Use the configured exception handling <snip - we're not using configured exception handling> } So then I started checking things that would cause Struts problems, such as checking a) the name and package of my classes (comparing to the one declared in my struts-config file) b) that the class extends o.a.struts.action.Action c) the signature of the 'execute' method
But everything looked good. In addition, when I execute the same URL in our test environments. I don't see this problem. It appears to be sporadic. Does anyone have any ideas on how I can further troubleshoot these NPEs or obtain the complete stack trace. Without this information, it's virtually impossible to figure out what the root cause is. Thanks, JOHN 2004-05-03 10:01:16,413 ExecuteThread: '39' for queue: 'default' WARN org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.NullPointerException 2004-05-03 10:01:16,413 ExecuteThread: '39' for queue: 'default' ERROR com.erac.fleetsystems.strutsx.FleetSystemsServlet - Error processing HTTP request - javax.servlet.ServletException javax.servlet.ServletException at org.apache.struts.action.RequestProcessor.processException(RequestProces sor.java(Compiled Code)) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java(Inlined Compiled Code)) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java( Compiled Code)) at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Compil ed Code)) at com.erac.fleetsystems.strutsx.FleetSystemsServlet.process(FleetSystemsSe rvlet.java(Compiled Code)) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compile d Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se rvletStubImpl.java(Compiled Code)) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java(Compiled Code)) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java(Compiled Code)) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java( Compiled Code)) at com.erac.edge.presentation.util.EdgeUowFilter.doFirstTimeFilter(EdgeUowF ilter.java(Compiled Code)) at com.erac.fleetsystems.strutsx.FirstTimeOnlyFilter.doFilter(FirstTimeOnly Filter.java(Compiled Code)) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java( Inlined Compiled Code)) at com.erac.edge.presentation.util.LoggingFilter.doFirstTimeFilter(LoggingF ilter.java(Compiled Code)) at com.erac.fleetsystems.strutsx.FirstTimeOnlyFilter.doFilter(FirstTimeOnly Filter.java(Compiled Code)) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java( Inlined Compiled Code)) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r un(WebAppServletContext.java(Compiled Code)) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa nager.java(Compiled Code)) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl etContext.java(Compiled Code)) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. java(Compiled Code)) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code)) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)