jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Warner Onstine <wonst...@vmsinfo.com>
Subject configuring jaas?
Date Thu, 24 Jul 2008 23:24:04 GMT
Ok, I know I'm probably doing something stupid here but I can't find  
any decent tutorials that actually specify what specifically to do  
other than "Just create a jaas.config file and put in your project".

I am currently extending the SimpleWebdavServlet like so:
public Repository getRepository() {
         if (repository == null) {
             try {
                 repository = createNewRepository();
             } catch (NamingException e) {
                 e.printStackTrace();  //To change body of catch  
statement use File | Settings | File Templates.
             } catch (RepositoryException e) {
                 e.printStackTrace();  //To change body of catch  
statement use File | Settings | File Templates.
         return repository;

     private Repository createNewRepository() throws NamingException,  
RepositoryException {
         String configFile = "repository.xml";
         String repHomeDir = "/Users/warnero/test-repo";

         Hashtable env = new Hashtable();
             + ".provider.DummyInitialContextFactory");
         env.put(Context.PROVIDER_URL, "localhost");
         InitialContext ctx = new InitialContext(env);

         RegistryHelper.registerRepository(ctx, "repo", configFile,  
repHomeDir, true);
         return (Repository)ctx.lookup("repo");


When I attempt to hit the repository at

The servlet comes up with the authentication response, but if I just  
hit Ok then I get this error:

I have a jaas.config file located in my web directory (both WEB-INF  
and classes) :
Jackrabbit {
org.apache.jackrabbit.core.security.SimpleLoginModule required  

And this is also setup in my repository.xml file

<Security appName="Jackrabbit">
             access manager:
             class: FQN of class implementing the AccessManager  
             <!-- <param name="config" value="${rep.home}/access.xml"/ 
 > -->

            <!-- anonymous user name ('anonymous' is the default  
value) -->
            <param name="anonymousId" value="anonymous"/>

All of this is fairly straightforward from the Web site, I can't seem  
to find in the jackrabbit-webapp an actual jaas.config file in the  
war, so I'm not sure what I need to do to set this up properly.

Thanks in advance!


View raw message