jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simer anand <simer.anan...@gmail.com>
Subject Login Exception
Date Thu, 22 Oct 2009 09:37:26 GMT

Hello Users,

                  I tried jaas authentication for my repository and after
subtituting it in repository i tried to connect it with FirstHop and
SecondHop program using RMI then it shows some bugs like this:

Exception in thread "main" javax.jcr.LoginException: Error:
javax.security.auth.callback.NameCallback@183d59c not available to garner
authentication information from the user: Error:
javax.security.auth.callback.NameCallback@183d59c not available to garner
authentication information from the user

need suggestion on this issue

import org.apache.jackrabbit.rmi.repository.*;
import javax.jcr.Repository;
import javax.jcr.Session;
import org.apache.jackrabbit.core.TransientRepository;
import javax.jcr.SimpleCredentials;

public class FirstHop {
   public static void main(String[] args) throws Exception {
        Repository repository = new
URLRemoteRepository("http://localhost:8080/jackrabbit-webapp-1.5.6/rmi");
        Session session = repository.login(new SimpleCredentials("username",
"password".toCharArray()));
        try{
            String user = session.getUserID();
            String name =
repository.getDescriptor(Repository.REP_NAME_DESC);
            System.out.println(
                   "Logged in as " + user + " to a " + name + "
repository.");
          } finally {  session.logout();}}}
     
          
 Thanks,
  anand    
~
~
~
~

 
-- 
View this message in context: http://www.nabble.com/Node-Locked-tp25986753p26007053.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message