Fix errors when redirecting to error page
-----------------------------------------
Key: NXP-4240
URL: http://jira.nuxeo.org/browse/NXP-4240
Project: Nuxeo Enterprise Platform
Issue Type: Bug
Affects Versions: 5.3 RC
Reporter: Anahide Tchertchian
Assignee: Anahide Tchertchian
Fix For: 5.3 GA
Some errors persist in excpetion handling mechanism (see NXP-3428), when mock
faces context created for error handling is not properly removed from current
context.
For instance:
1. exception hadling catches an error, for instance:
Caused by: ClientAbortException: java.net.SocketException: Connection reset
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
2. error is handled correctly and put in nuxeo-error.log :
[org.nuxeo.ecm.webapp.shield.SeamExceptionHandlingListener] Created mock faces
context for exception handling
3. Response is already commited => ERROR
[org.nuxeo.ecm.platform.web.common.exceptionhandling.DefaultNuxeoExceptionHandler]
Cannot forward to error page: response is already commited
4. mock faces context created previously is not cleant up correctly => we get
additional errors like:
javax.servlet.ServletException: org.apache.jasper.JasperException: An exception
occurred processing JSP page /login.jsp at line 206
...
Caused by: java.lang.UnsupportedOperationException
at
org.jboss.seam.mock.MockApplication.getELContextListeners(MockApplication.java:93)
at
com.sun.faces.el.ELContextListenerImpl.contextCreated(ELContextListenerImpl.java:70)
...
java.lang.NullPointerException
at
org.apache.catalina.connector.Request.removeAttribute(Request.java:1354)
at
org.apache.catalina.connector.RequestFacade.removeAttribute(RequestFacade.java:514)
at
org.jboss.seam.mock.MockExternalContext$2.removeAttribute(MockExternalContext.java:274)
at
org.jboss.seam.mock.MockExternalContext$AttributeMap.remove(MockExternalContext.java:471)
at org.jboss.seam.contexts.BasicContext.remove(BasicContext.java:73)
at org.jboss.seam.Component.newInstance(Component.java:2070)
=> need to cleanup the mock faces context in any case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets