Protected URL returns error 500 in JBoss EAP 7

Solution Verified - Updated -

Issue

The authorization module is returning error 500 when accessing a private page that requires an authenticated user. An exception is thrown:

25-09-2017 09:31:53,295 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /reserved/url/application: java.lang.NullPointerException
        at io.undertow.servlet.spec.HttpServletRequestImpl.getRequestDispatcher(HttpServletRequestImpl.java:892) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.security.ServletFormAuthenticationMechanism.servePage(ServletFormAuthenticationMechanism.java:94) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.FormAuthenticationMechanism.sendChallenge(FormAuthenticationMechanism.java:172) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.SecurityContextImpl$ChallengeSender.transition(SecurityContextImpl.java:295) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.SecurityContextImpl$ChallengeSender.access$300(SecurityContextImpl.java:278) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.SecurityContextImpl.sendChallenges(SecurityContextImpl.java:129) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:102) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:107) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.impl.SecurityContextImpl.authenticate(SecurityContextImpl.java:92) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:55) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at org.wildfly.mod_cluster.undertow.metric.RunningRequestsHttpHandler.handleRequest(RunningRequestsHttpHandler.java:69)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175) [undertow-servlet-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:209) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802) [undertow-core-1.3.27.Final-redhat-1.jar:1.3.27.Final-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]

Environment

Red Hat Enterprise Application Platform (EAP) 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In