Hello
Has someone already solved this issue because I encountered the same problem. I am using Acegi 0.8.3, spring 1.2.4 and WL 8.1 SP4.
After some debugging I discovered that sometimes there are two System.properties referencing to the same file. Namely java.security.auth.login.config and a property called login.config.url.x.
I think this somehow confuses the javax.security.auth.login.LoginContext, because if only the system property java.security.auth.login.config is set and refferencing to the specified file it works fine. But after reloading the spring config (e.g. after a hot-deployment) it also sets a property called login.config.url.x and then it gives the error No LoginModules found. Here is the code were that happens:
Code:
public void afterPropertiesSet() throws Exception {
//irrelevant code omitted....
boolean allowed = "true".equalsIgnoreCase(Security.getProperty(
"policy.allowSystemProperty"));
if (allowed && (System.getProperty(SYSPROP) == null)) {
log.debug("Setting system property [" + SYSPROP + "] to: "
+ loginConfigStr);
System.setProperty(SYSPROP, loginConfigStr);
} else {
setPropertyUsingLoop(loginConfigStr);
}
// irrelevant code omitted....
}
To fix this I also overrote the JaasAuthenticationProvider.afterPropertiesSet and there I check if the System.property java.security.auth.login.config is already set and reffering to the file specified in the Spring config (now only a check for null is done), if not I call the afterPropertiesSet of the JaasAuthenticationProvider itself. This works fine.
Lars.