I am using Java 6, jsf 1.2, spring on tomcat and if I do an operation after a timeout from a certain page, I get the exception below.
My question is why doesn’t the page get redirected to my error page /error/error.jsf?
This is the web.xml (I have no filters):
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/error/error.jsf</location>
</error-page>
<error-page>
<exception-type>java.lang.IllegalStateException</exception-type>
<location>/error/error.jsf</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error/error.jsf</location>
</error-page>
<error-page>
<exception-type>org.springframework.beans.factory.BeanCreationException</exception-type>
<location>/error/error.jsf</location>
</error-page>
This is the error message on my page:
An Error Occurred:
Error creating bean with name 'melaketViewHandler' defined in
ServletContext resource [/WEB-INF/JSFViewHandlersContext.xml]: Instantiation
of bean failed; nested exception is org.springframework.beans.BeanInstantiationException:
Could not instantiate bean class [com.ewave.meuhedet.view.melaketViewHandlers.MelaketViewHandler]: Constructor threw
exception; nested exception is java.lang.NullPointerException
- Stack Trace
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'melaketViewHandler' defined in ServletContext resource
[/WEB-INF/JSFViewHandlersContext.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [com.ewave.meuhedet.view.melaketViewHandlers.MelaketViewHandler]:
Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
...
We’re using a custom view handler that catches the exceptions and redirects to the error page: