File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JAAS .....Login Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JAAS .....Login Problem" Watch "JAAS .....Login Problem" New topic
Author

JAAS .....Login Problem

srinivas anigani
Greenhorn

Joined: Aug 28, 2005
Posts: 7
Environment :
windows XP
Websphere 4.0
DB2 Client 7.2

After giving login and password in the application I am getting the following error in the default_server_stderr.log file as follows:


java.lang.SecurityException: Configuration Error:
Invalid control flag, debug
at com.sun.security.auth.login.ConfigFile.getAppConfigurationEntry(ConfigFile.java:221)
at javax.security.auth.login.LoginContext.init(LoginContext.java:172)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:319)
at com.mst.security.domain.SecurityService.login(SecurityService.java:76)
at com.mst.security.servlet.SecurityController.doPost(SecurityController.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:718)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:428)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:870)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:788)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:439)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:239)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:104)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:61)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:132)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:271)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:49)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:303)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:232)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
java.lang.SecurityException: Configuration Error:
Line 6: expected '{', found 'null'
at com.sun.security.auth.login.ConfigFile.getAppConfigurationEntry(ConfigFile.java:221)
at javax.security.auth.login.LoginContext.init(LoginContext.java:172)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:319)
at com.mst.security.domain.SecurityService.login(SecurityService.java:76)
at com.mst.security.servlet.SecurityController.doPost(SecurityController.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:718)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at com.ibm.servlet.engine.webapp.ServicingServletState.service(StrictLifecycleServlet.java:307)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:428)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:870)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:788)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:439)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:239)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:104)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:61)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:132)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:271)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:49)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:303)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:232)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)


what is happening?

In the java.security file I have added these two lines

login.configuration.provider=com.sun.security.auth.login.ConfigFile
login.config.url.1=file:c:/Mahavikas/Development/Code/com/mst/properties/mst_jaas.config


Policy file is :

grant codebase "file:c:/Mahavikas/Development/Code/com/mst/helper-jar/helper_security.jar" {
permission javax.security.auth.AuthPermission "createLoginContext.Login";
};


mst_jaas.config file is as follows :

Login {
com.mst.security.domain.MSTLoginModule required debug=true;
};

Authorize {
com.mst.security.domain.MSTAuthorizationModule required debug=true;
};

OnlineLogin {
com.mst.security.domain.MSTOnlineLoginModule required debug=true;
};


Please help me in overcoming this problem...


Regards
Srinivas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAAS .....Login Problem