Exception Page
This page demonstrates Clicks error handling.- NullPointerException
- This error is caused by the Pages onExceptionClick() method throwing a NullPointerException. Note how the error report shows you the exact line where the error occurred. Click will do this if it can find the Java source code on the classpath or under the WEB-INF directory.
- IllegalArgumentException
- This error is caused by the Pages onIllegalArgumentClick() method throwing a IllegalArgumentException. Note how the error report shows you the exact line where the error occurred. Click will do this if it can find the Java source code on the classpath or under the WEB-INF directory.
- NoSuchMethodException
- This error is caused by a Control action listener being set to a method which doesn't exist. Typically a typo error when setting Control listeners. When the control attempts to call the listeners callback method it will throw a NoSuchMethodException. In this example the Java source code is not available, so the error source is not highlighted.
- Broken Page Border Template
- This error is caused by an invalid Velocity expression in a page border template. When Velocity tries to parse this expression it will throw a ParseErrorException. At this point no output will have been written to the HttpServletResponse and the ErrorPage will render the error report in the error.htm page template. Note these types of exceptions are pretty rare. Most of the time Velocity will ignore template errors and simply render the invalid template code.
- Broken Page Content Template
- This is another example of an invalid Velocity expression, but this time it is contained in the page content template. When a exception occurs in a content template, Velocity will be performing a merge of the Page model and the border template, and including the content template. At this point Velocity will most probably have written border template output to the HttpServletResponse so the ClickServlet appends the error report to the response output stream before it is closed.
- Broken Renderer
-
This error is caused by a Page model object throwing a NPE when being rendered by
Velocity. When Velocity tries to merge the page model with the template, it will
call the objects toString() method which throws a NullPointerException.
As this error usually occurs after some contents has been written to the
HttpServletResponse Click will append the error report
to the end of the response.
- Line 1
Exception Class java.lang.NullPointerException Message null 100:101: /**102: * Guaranteed to fail, or you money back.103: *104: * @see Object#toString()105: */106: @SuppressWarnings("null")107: @Override108: public String toString() {109: Object object = null;110: return object.toString();111: }112: }113:114: }java.lang.NullPointerException at org.apache.click.examples.page.general.ExceptionPage$BrokenRenderer.toString(ExceptionPage.java:110) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:430) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at org.apache.velocity.runtime.directive.Parse.render(Parse.java:260) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at org.apache.velocity.Template.merge(Template.java:356) at org.apache.velocity.Template.merge(Template.java:260) at org.apache.click.service.VelocityTemplateService.internalRenderTemplate(VelocityTemplateService.java:537) at org.apache.click.service.VelocityTemplateService.renderTemplate(VelocityTemplateService.java:330) at org.apache.click.ClickServlet.renderTemplate(ClickServlet.java:948) at org.apache.click.ClickServlet.performRender(ClickServlet.java:905) at org.apache.click.ClickServlet.processPageEvents(ClickServlet.java:618) at org.apache.click.ClickServlet.processPage(ClickServlet.java:561) at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383) at org.apache.click.ClickServlet.doGet(ClickServlet.java:276) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.click.extras.filter.PerformanceFilter.doFilter(PerformanceFilter.java:409) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:52) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.click.extras.cayenne.DataContextFilter.doFilter(DataContextFilter.java:348) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
Page Classname org.apache.click.examples.page.general.ExceptionPage Path /general/exception.htm Request Attributes __spring_security_filterSecurityInterceptor_filterApplied=true
__spring_security_session_integration_filter_applied=true
enable-resource-version=trueAuth Type null Context Path /click-examples Headers accept=*/*
accept-encoding=gzip, br, zstd, deflate
host=e-shabda.com:9090
user-agent=Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)Query actionLink=brokenRendererLink Method GET Parameters actionLink=brokenRendererLink Remote User null URI /click-examples/general/exception.htm URL http://e-shabda.com:9090/click-examples/general/exception.htm Session