0 Replies Latest reply on Nov 4, 2001 3:38 AM by Eric Chow

    JAAS failed to login to access EJB

    Eric Chow Newbie

      Hi,

      I downloaded the JBossSX example from JavaWorld.
      After I compiled all the sources and I only deploy the ssbean1.jar and the ssbean2.jar to the JBoss.


      I tried to run the SessionClient.class with the command : "java SessionClient java echoman example1".

      It raised some exceptions as following :
      ================================================
      Error, couldn't load users/passwords/role files.
      java.io.IOException: Properties file users.properties not found
      at org.jboss.security.auth.spi.UsersRolesLoginModule.loadProperties(UsersRolesLoginModule.java:200)
      at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:181)
      at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:79)
      at java.lang.reflect.Method.invoke(Native Method)
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:582)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
      at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:449)
      at org.jboss.docs.jaas.howto.SessionClient.main(SessionClient.java:72)

      javax.security.auth.login.LoginException: Missing users.properties file.
      at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:106)
      at java.lang.reflect.Method.invoke(Native Method)
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
      at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:449)
      at org.jboss.docs.jaas.howto.SessionClient.main(SessionClient.java:72)

      javax.naming.NameNotFoundException: PublicSession not bound
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
      at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
      at sun.rmi.server.UnicastRef.invoke(Unknown Source)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at org.jboss.docs.jaas.howto.SessionClient.main(SessionClient.java:83)

      ================================================


      Please teach me how to solve this ?
      In fact, the users.properties and the roles.properties I have put them in the ssbean1.jar and the ssbean2.jar.

      Where should I put them in ?

      Best regards,
      Eric