Sunday, March 26, 2006

Missing JAAS Config

Keywords:
"Unable to locate a login configuration" JAAS Tomcat

Problem:
Starting up tomcat as a service on Windows the above error message with stack trace displayed. The file it's referring to as missing is in the folder %CATALINA_HOME%/conf/jaas.config

Solution:
You need to make sure the system property "java.security.auth.login.config"
is defined & this should be a full path to the file. This can be via the -D JVM option. eg:
-Djava.security.auth.login.config=%CATALINA_BASE%\conf\jaas.config

Depending on whether you run tomcat via "catalina.bat" or the windows service will determine the best place to put this option.


Notes:
Ok, not a profound solution to start with but it's a solution with a problem description that will hopefully come up in a similar keyword search. I had to scroll to the 6th search result on http://www.google.com.au/search?hl=en&q=%22Unable+to+locate+a+login+configuration%22+JAAS+Tomcat
which actually isn't too bad.

No comments: