Hi,

I would say, this is a highly unlikely and unexpected situation: The
handler field of the EngineAuthenticationHandlerHolder should not be null.

There is a slight chance of this happen anyway: If the service cannot be
retrieved from the framework (because it has already been unregistered
at the time the service is asked for which may happen in a highly
dynamic situation).

Added a guard to not register the handler if the service cannot be
retrieved. [1]

Regards
Felix

[1] https://issues.apache.org/jira/browse/SLING-1493

On 19.04.2010 18:05, Carl Hall wrote:
> I get the following stacktrace when I try to go through an authentication
> handler I have setup.  Any suggestions to the cause?
> 
> 19.04.2010 11:42:47.604 *WARN* [116647...@qtp-1246618622-16]
> org.mortbay.jetty EXCEPTION  java.lang.NullPointerException
>         at
> org.apache.sling.commons.auth.impl.engine.EngineAuthenticationHandlerHolder.doExtractCredentials(EngineAuthenticationHandlerHolder.java:63)
>         at
> org.apache.sling.commons.auth.impl.AbstractAuthenticationHandlerHolder.extractCredentials(AbstractAuthenticationHandlerHolder.java:60)
>         at
> org.apache.sling.commons.auth.impl.SlingAuthenticator.getAuthenticationInfo(SlingAuthenticator.java:560)
>         at
> org.apache.sling.commons.auth.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:374)
>         at
> org.apache.sling.engine.impl.SlingMainServlet.handleSecurity(SlingMainServlet.java:832)
>         at
> org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:62)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at
> org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
>         at
> org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
>         at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>         at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
> 

Reply via email to