[
http://jira.jboss.com/jira/browse/JBSEAM-2930?page=all ]
Pete Muir updated JBSEAM-2930:
------------------------------
Fix Version/s: 2.0.2.CR2
2.1.0.BETA1
Yes, we should catch the NPE and throw a more meaningful error. But that your VE resolves
to null is your problem.
Exception handling in pages.xml ignores EL expressions
------------------------------------------------------
Key: JBSEAM-2930
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2930
Project: Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.1.GA
Environment: JBOSS 4.2.2, Windows XP
Reporter: Wolfgang Chico Toepfer
Fix For: 2.0.2.CR2, 2.1.0.BETA1
When I try to catch and handle an exception by means of the exception tag in pages.xml,
the exception is not properly handled because the EL expression is not resolved.
<exception class="de.pta.exception.ValidationException">
<redirect view-id="#{emrNavigationManager.currentViewId}" />
</exception>
The same problem also occurs with the annotation alternative:
@Redirect(viewId="#{emrNavigationManager.currentViewId}")
public class ValidationException extends RuntimeException {
public ValidationException(String message) {
super(message);
}
}
Here's the log:
13:07:25,229 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw
exception
java.lang.NullPointerException
at org.jboss.seam.mock.MockViewHandler.getActionURL(MockViewHandler.java:41)
at org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:74)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:154)
at org.jboss.seam.faces.Navigator.redirect(Navigator.java:46)
at org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:75)
at
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.pta.servlet.HttpSessionTimeoutFilter.doFilter(HttpSessionTimeoutFilter.java:67)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira