Re: Catching Exception in Application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan, On 1/28/12 9:49 AM, Jonathan Rosenberg wrote: Thanks to all for your ideas. The problem turned out to be an error in my JSP file. That was going to be my guess. I guess this was causing the original exception to be propagated to Tomcat? Yes. Make sure your error pages have isErrorPage=true in your error JSPs, otherwise bad things can happen. :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8oUEIACgkQ9CaO5/Lv0PDJxgCeLW0SoFXFb/bCf0XJ+XcZCunt KxUAni7NEoFd24P39Rhkkk0/mkzqGSbO =iyUV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Catching Exception in Application
On Fri, Jan 27, 2012 at 6:46 PM, Terence M. Bandoian tere...@tmbsw.com wrote: On 1:59 PM, Pid wrote: On 27/01/2012 18:53, Jonathan Rosenberg wrote: On Fri, Jan 27, 2012 at 1:45 PM, Pidp...@pidster.com wrote: On 27/01/2012 18:38, Jonathan Rosenberg wrote: That is in the original CAS server web.xml. I left it untouched. For the rest of the day, as an experiment I will bottom-post to any thread containing a reply via top-post. On Fri, Jan 27, 2012 at 1:35 PM, Pidp...@pidster.com wrote: On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20 Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Did you post the whole error page definition block? What was the original contents and what have you added? Original error-page elements: error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page error-page error-code403/error-code location/403.html/location /error-page I added this error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page OK, what error page do you get if you cause the error without this entry? p -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ Hi, Jonathan- From the Java Servlet Specification: The location element contains the location of the resource in the web application relative to the root of the web application. The value of the location must have a leading ‘/’. I specify locations as I would access them from the web. For example, and depending on how your JSPs are mapped, I would use: location/exception.jsp/location as the location sub-element for the java.lang.Exception error page. The leading /WEB-INF/view/jsp might be getting in the way. -Terence Bandoian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Thanks to all for your ideas.
Re: Catching Exception in Application
On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Catching Exception in Application
That is in the original CAS server web.xml. I left it untouched. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ On Fri, Jan 27, 2012 at 1:35 PM, Pid p...@pidster.com wrote: On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20 Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Catching Exception in Application
On 27/01/2012 18:38, Jonathan Rosenberg wrote: That is in the original CAS server web.xml. I left it untouched. For the rest of the day, as an experiment I will bottom-post to any thread containing a reply via top-post. On Fri, Jan 27, 2012 at 1:35 PM, Pid p...@pidster.com wrote: On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Did you post the whole error page definition block? What was the original contents and what have you added? p -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Catching Exception in Application
On Fri, Jan 27, 2012 at 1:45 PM, Pid p...@pidster.com wrote: On 27/01/2012 18:38, Jonathan Rosenberg wrote: That is in the original CAS server web.xml. I left it untouched. For the rest of the day, as an experiment I will bottom-post to any thread containing a reply via top-post. On Fri, Jan 27, 2012 at 1:35 PM, Pid p...@pidster.com wrote: On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20 Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Did you post the whole error page definition block? What was the original contents and what have you added? Original error-page elements: error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page error-page error-code403/error-code location/403.html/location /error-page I added this error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Catching Exception in Application
On 27/01/2012 18:53, Jonathan Rosenberg wrote: On Fri, Jan 27, 2012 at 1:45 PM, Pid p...@pidster.com wrote: On 27/01/2012 18:38, Jonathan Rosenberg wrote: That is in the original CAS server web.xml. I left it untouched. For the rest of the day, as an experiment I will bottom-post to any thread containing a reply via top-post. On Fri, Jan 27, 2012 at 1:35 PM, Pid p...@pidster.com wrote: On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Did you post the whole error page definition block? What was the original contents and what have you added? Original error-page elements: error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page error-page error-code403/error-code location/403.html/location /error-page I added this error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page OK, what error page do you get if you cause the error without this entry? p -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Catching Exception in Application
On 1:59 PM, Pid wrote: On 27/01/2012 18:53, Jonathan Rosenberg wrote: On Fri, Jan 27, 2012 at 1:45 PM, Pidp...@pidster.com wrote: On 27/01/2012 18:38, Jonathan Rosenberg wrote: That is in the original CAS server web.xml. I left it untouched. For the rest of the day, as an experiment I will bottom-post to any thread containing a reply via top-post. On Fri, Jan 27, 2012 at 1:35 PM, Pidp...@pidster.com wrote: On 27/01/2012 18:00, Jonathan Rosenberg wrote: Vital stats: Apache Tomcat/7.0.22 1.6.0_20-b20Sun Microsystems Inc. Linux 2.6.34.7-56.40.amzn1.i686 I have a CAS server deployed on this instance. I am trying to catch errors within the server (e.g., DB down) so I can display friendly page to user log error. In the web.xml for the CAS server I have (I added error-page for java.lang.Exception, ohters were already there) error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page Is the above correct? A 404 returns '/'? p error-page error-code403/error-code location/403.html/location /error-page Bu when I trigger an error (i.e., stop DB) I am seeing the default Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@17b2b99 targetAction = [EvaluateAction@16b653d expression = authenticationViaFormAction.submit(flowRequestContext, flowScope.credentials, messageContext), resultExpression = [null]], attributes = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution attributes were 'map[[empty]]' . . . I'm a newbie to Tomcat am not sure where to start looking. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Did you post the whole error page definition block? What was the original contents and what have you added? Original error-page elements: error-page exception-typeorg.springframework.context.ApplicationContextException/exception-type location/WEB-INF/view/jsp/brokenContext.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page error-page error-code500/error-code location/WEB-INF/view/jsp/errors.jsp/location /error-page error-page error-code404/error-code location//location /error-page error-page error-code403/error-code location/403.html/location /error-page I added this error-page exception-typejava.lang.Exception/exception-type location/WEB-INF/view/jsp/exception.jsp/location /error-page OK, what error page do you get if you cause the error without this entry? p -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ Hi, Jonathan- From the Java Servlet Specification: The location element contains the location of the resource in the web application relative to the root of the web application. The value of the location must have a leading ‘/’. I specify locations as I would access them from the web. For example, and depending on how your JSPs are mapped, I would use: location/exception.jsp/location as the location sub-element for the java.lang.Exception error page. The leading /WEB-INF/view/jsp might be getting in the way. -Terence Bandoian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org