Juraj Húska created RF-13577:
--------------------------------
Summary: Handling non existing resource on WildFly causes NPE when there is
custom error page
Key: RF-13577
URL:
https://issues.jboss.org/browse/RF-13577
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 5.0.0.Alpha4
Environment: richfaces 5.0.0-SNAPSHOT
WildFly 8.0.0.Final
Reporter: Juraj Húska
When an application has custom error page for HTML error code 404, then handling of 404
can cause NPE on WildFly server.
The NPE being thrown is:
{code}
[31m21:15:59,981 ERROR [io.undertow.request] (default task-7) UT005023: Exception handling
request to /metamer/faces/error/404.xhtml: javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
[jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:93)
[classes:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
[undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)
[undertow-core-1.0.0.Final.jar:1.0.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: java.lang.NullPointerException
at javax.faces.component.UIComponent.getCurrentComponent(UIComponent.java:2138)
[jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:111)
[jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at
com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at
org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:299)
[wildfly-jsf-injection-8.0.0.Final.jar:8.0.0.Final]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
[jsf-impl-2.2.5-jbossorg-3.jar:]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
[jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
{code}
When there is no custom error page, no exception is thrown to the server console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira