0 Replies Latest reply on Nov 1, 2005 1:16 PM by Dietmar Auferkorte

    Unable to locate a login configuration

    Dietmar Auferkorte Newbie

      Got the server running without error message.

      when I now start the client program, I get the following error:

      java.lang.SecurityException: Unable to locate a login configuration
      at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at java.lang.Class.newInstance0(Class.java:350)
      at java.lang.Class.newInstance(Class.java:303)
      at javax.security.auth.login.Configuration$3.run(Configuration.java:216)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:210)
      at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
      at javax.security.auth.login.LoginContext.(LoginContext.java:403)
      ....

      My client program is very simple (implemented after 'Mastering EJB'), the contect creation fails:

      public static void main(String[] args) {
      try {
      Properties props = System.getProperties();
      Context initial = new InitialContext(props);
      System.out.println("[DEBUG] Initial context created!");
      Object objref = initial.lookup("ConverterHome");
      System.out.println("[DEBUG] Look up of Home object successful!");
      ConverterHome home =
      (ConverterHome) PortableRemoteObject.narrow(objref,
      ConverterHome.class);
      ...

      What do I need to do?

      Thanks & regards