users@glassfish.java.net

Problems with Programmatic Login / JAAS default LoginModule not configured?

From: <glassfish_at_javadesktop.org>
Date: Tue, 07 Oct 2008 07:44:54 PDT

Hi all,

I'm getting an unusual(=google can't find anything like that) exception when trying to access a Session Bean(running on v2ur2) from a standalone client, using programmatic login:

[code]
07-Oct-2008 16:19:13 com.sun.appserv.security.ProgrammaticLogin login
SEVERE: Programmatic login failed: com.sun.enterprise.security.LoginException: javax.security.auth.login.LoginException: No LoginModules configured for default
[/code]

My Code:
[code]
        ProgrammaticLogin pm = new ProgrammaticLogin();
        try {
            pm.login("user", "user","file",false);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
[/code]

I'm adding an authentication file with [i]-Djava.security.auth.login.config[/i]:
[code]
file {
        com.sun.enterprise.security.auth.login.FileLoginModule required;
};
[/code]

In the GF admin console everything seems to look ok, I didn't make any changes to the default settings, only added a user to the default file realm. So where can I set/configure the default LoginModule?
[Message sent by forum member 'frnk' (frnk)]

http://forums.java.net/jive/thread.jspa?messageID=303749