users@glassfish.java.net

Login.config problem.. JAAS with glassfish..on netbeans

From: <glassfish_at_javadesktop.org>
Date: Fri, 03 Oct 2008 05:27:56 PDT

Hi,

    Can anyone help me in solving this problem. I am new to glassfish and also to JAAS..

I have created a LoginModule.java, MyPrincipal.java and MyloginContext.java. I am using netbeans 6.5 beta..

i have a login.config file as shown below..

fileRealm
{
   LoginModule required;
};

i have MyloginContext as follows:

LoginContext Context = null

Context = new LoginContext("fileRealm", new MyCallbackHandler());

Context.login();

when i try to run the code i am getting error as

LoginContext cannot be created. Unable to locate a login configuration
Exception in thread "main" java.lang.NullPointerException

 Can any one help me what is going. And also please tell me how to configure in netbeans

  And also please give me any examples or tutorials which tell about glassfish and netbeans for Authentication.
[Message sent by forum member 'javeedsyed' (javeedsyed)]

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