users@glassfish.java.net

Re: glassfish, jdbcRealm, custom GUI login dialog.Error: No LoginModules co

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 Dec 2007 23:27:07 PST

The real cause appears to be that in your Appclient constructor (ca.littleriver.bovinemanagement.appclient.Main.<init>) you are trying to construct a LoginContext with "k" as the configuration name and your custom callbackhandler...

------------------------
Caused by: javax.security.auth.login.LoginException: No LoginModules configured for k
        at javax.security.auth.login.LoginContext.init(LoginContext.java:256)
        at javax.security.auth.login.LoginContext.<init>(LoginContext.java:334)
        at ca.littleriver.bovinemanagement.appclient.Main.<init>(Main.java:77)
        at ca.littleriver.bovinemanagement.appclient.Main.main(Main.java:186)
---------------------

https://glassfish.dev.java.net/javaee5/docs/DG/beakt.html#beakw

The way to specify a custom callbackhandler with Appclient, is to specify the fully qualified classname of your CallbackHandler class in application-client.xml

<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                    http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
                    version="1.4">

  <ejb-ref>
   .....
  </ejb-ref>

  <callback-handler>ca.littleriver.bovinemanagement.appclient.DialogCallbackHandler
  </callback-handler>
</application-client>
[Message sent by forum member 'kumarjayanti' (kumarjayanti)]

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