jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yao Harrison <harrison.g...@gmail.com>
Subject Can not login with deployment model 2 ( Shared J2EE Resource )
Date Wed, 02 Nov 2005 10:03:31 GMT
Hi List:

    I'm using jackrabbit as a public repository for all the web
applications on  same tomcat server , and the repository object was
returned correctly from JNDI  with
ctx.lookup("java:comp/jcr/repository") method , but the
jcr.LoginException was thrown when I use SimpleCredential object login
the repository with "javax.jcr.LoginException:
org.apache.jackrabbit.core.security.CredentialsCallback@b512cb not
available " . So does anyone else encountered this matter before and
how to resovle it.

code snippet :

in servlet:

InitialContext context = new InitialContext();
Context environment = (Context) context.lookup("java:comp/env");
Repository repository = (Repository) environment.lookup("jcr/repository");
Session s = repository.login(new
SimpleCredentials("user","pass".toCharArray()));

program env :
tomcat 5.0.28 + jetspeed 2.0 M3 +jackrabbit

note :
I've added the login module config infomation in jetspeed jaas config file

 Jetspeed {
   org.apache.jetspeed.security.impl.MyLoginModule required debug="true";
};

Jackrabbit {
  org.apache.jackrabbit.core.security.SimpleLoginModule required
  	anonymousId="anonymous"
  	debug="true";
};

Mime
View raw message