jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Todorov <carlspr...@gmail.com>
Subject NPE when trying to use DefaultLoginModule from a webapp
Date Thu, 26 Apr 2012 13:42:54 GMT
Hi,

I am getting the following error when trying to configure a LoginModule
under Jetty:

2012-04-26 16:30:46,771 ERROR
org.apache.jackrabbit.core.security.authentication.AbstractLoginModule -
LoginModule failed to initialize.
java.lang.NullPointerException
at
org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.initialize(AbstractLoginModule.java:157)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
 at javax.security.auth.login.LoginContext.invoke(LoginContext.java:771)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
 at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
 at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
 at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
at
org.eclipse.jetty.plus.jaas.JAASLoginService.login(JAASLoginService.java:217)
 at
org.eclipse.jetty.security.authentication.FormAuthenticator.validateRequest(FormAuthenticator.java:183)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:456)
 at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
 at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
 at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
 at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
 at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
 at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
 at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
 at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
 at java.lang.Thread.run(Thread.java:722)

My login.conf is as follows:
foo {
    org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
required
                                                    debug=true
                                                    disableTokenAuth="true"
                                                    tokenExpiration="25"

principalProvider="org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider";
};

The error happens when I try to login via my application's login screen,
which means that the login.conf is loaded alright. I ran things through a
debugger and the registry is null for some reason:
PrincipalProviderRegistry registry =
repositoryCb.getPrincipalProviderRegistry();

In the debugger, I can also see that the principalProvider is set correctly.

Am I missing a property or something? I couldn't really find a full list of
properties one could define for the Jackrabbit login modules.

Any hints would be much appreciated!
Thanks in advance,

Martin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message