File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes JAAS- Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "JAAS- "No LoginModule found for ur jaas_configinfo!"" Watch "JAAS- "No LoginModule found for ur jaas_configinfo!"" New topic

JAAS- "No LoginModule found for ur jaas_configinfo!"

Mrunmai Halbe

Joined: Apr 24, 2006
Posts: 4
PLZ help me out...
I have implemented an authentication code using JAAS.The login form is written as .JSP and have used MySQL as database.
The problem is when I run the code I get an error "No LoginModule found for jaas_configinfo" were "jaas_configinfo" is the module written in my configuration file which is as follows...

jaas_configinfo {
com.user.jaas_rdbms.authenticate.MyLoginModule Required debug="true" url= "jdbc:mysql://localhost:3306/userinfo?user=root&password=mrunmai" driver="com.mysql.jdbc.Driver";

and my JSP page is accepting the username and password from user and the related code is as follows...

try {
// Get the form's username & password fields
LoginContext lc= null;
String user = request.getParameter("username_text");
String pass = request.getParameter("password_text");

// Using the username/password to initialize the
// callback handler and then do the authentication.

MyCallbackhandler mcbh= new MyCallbackhandler(user,pass);
lc = new LoginContext("jaas_configinfo", mcbh);
when it comes to the line "lc=new LoginContext("jaas_congiginfo",mcbh);"
the exception "No LoginModule found for ur jaas_configinfo!" is generated..

I am using WSAD as the app. server and passing
"" as
Java VM arguments in the Environment Options of the Web-Server.

Don't understand whats wrong with that..
Plz help me out..

Thanks in advance ,
Awais Bajwa
Ranch Hand

Joined: Jan 16, 2001
Posts: 191
Where did you place your jaas configuration file? make sure that it is in the WebSphere runtime's classpath.

Awais Bajwa
I agree. Here's the link:
subject: JAAS- "No LoginModule found for ur jaas_configinfo!"
It's not a secret anymore!