users@glassfish.java.net

JSF on GlassFish: Exception Processing ErrorPage

From: <glassfish_at_javadesktop.org>
Date: Sat, 10 Jan 2009 15:40:02 PST

I'm using Sun Java System Application Server v.9.1_02 on Windows XP. I want to handle exceptions from a JSF application, so I added to web.xml:

  <error-page>
    <exception-type>javax.servlet.ServletException</exception-type>
    <location>/pages/error.faces</location>
  </error-page>

Instead of being redirected, I get this:

[#|2009-01-10T23:55:10.156+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=55;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=26c3a753-455a-42dd-9d60-2bffc14694ea;|org.apache.catalina.core.StandardHostValve_at_b9d27c: Exception Processing ErrorPage[exceptionType=javax.servlet.ServletException, location=/pages/error.faces]
javax.servlet.ServletException: #{QuickSearchBean.doBuy}: javax.servlet.ServletException
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:544)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:531)
        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:321)
        at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:230)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:633)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: javax.faces.FacesException: #{QuickSearchBean.doBuy}: javax.servlet.ServletException
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
        at javax.faces.component.UICommand.broadcast(UICommand.java:383)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        ... 28 more
Caused by: javax.faces.el.EvaluationException: javax.servlet.ServletException
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
        ... 35 more
Caused by: javax.servlet.ServletException


If I replace the error.jsp file with an error.html file and change web.xml accordingly, I do get redirected. So I assume something must be wrong with JSF/JSP.
[Message sent by forum member 'memox26' (memox26)]

http://forums.java.net/jive/thread.jspa?messageID=325179