2 Replies Latest reply on Jan 30, 2002 1:25 PM by Ed Brown

    Couldn't load Users/role.propeties

    Elena Dineva Newbie

      Hi everybody,
      I have a very simple client, a java class with a main method that authenticates the user and invokes an EJB method. I put my users.properties and role.properties in the jar file, where the EJB is, but the client doesn't find them. Any ideas?
      PLEASE HELP!

        • 1. Re: Couldn't load Users/role.propeties
          Ed Brown Newbie

          I am having the same problem.

          I start my client by

          java -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.provider.url=localhost -Djava.naming.factory.url.pkgs=org.jboss.naming -Djava.security.auth.login.config=C:\JBoss-2.4.4_Tomcat-4.0.1\jboss\conf\catalina\auth.conf secTest.TestLogin

          Then I get the following exception:

          ERROR [main] (?:?) - Failed to load users/passwords/role files
          java.io.IOException: Properties file users.properties not found
          at org.jboss.security.auth.spi.UsersRolesLoginModule.loadProperties(UsersRolesLoginModule.java:199)
          at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:180)
          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 sectest.TestLogin.(TestLogin.java:82)
          at sectest.TestLogin.main(TestLogin.java:240)
          javax.security.auth.login.LoginException: Missing users.properties file.
          at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:105)
          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)-- Failed initializing bean access.

          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 sectest.TestLogin.(TestLogin.java:82)-- Calling create(Carrier, Carrier)


          • 2. Re: Couldn't load Users/role.propeties
            Ed Brown Newbie

            Fixed this by putting auth.properties and user.properties into the classpath and now that is fixed.