3 Replies Latest reply on Feb 27, 2007 8:18 AM by r hh

    How to specify the principal and credentials from the client

    Claude Newbie

      Hi
      I'm trying to specify the principal and credentials from the client.
      I'm doing this that way:

      Properties properties = new Properties();
      properties.put(Context.SECURITY_PRINCIPAL, "user");
      properties.put(Context.SECURITY_CREDENTIALS, "passwd");
      Context context = null;
      context = new InitialContext(properties);

      Then, I use the initial context to do the lookup on my bean home and I call: home.create();
      It doesn't work. I get :
      RemoteException occurred in server thread; nested exception is:
      java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
      java.lang.SecurityException: Authentication exception, principal=null

      What's wrong???
      (I use JBoss 2.4.0)

      Thanks in advance
      Claude