问题
I have an application packaged in a WAR which is running great on an existing Tomcat6 server.
I am now trying to deploy it in tomcat7 but am getting the following error as soon as I run the login action: Failed login. Reason: LoginException: unable to find LoginModule class: security.jass.SimpleLoginModule
I have the contents below in the conf file, which is defined in Java's security.properties:
UserLoginImpo
{
security.jass.SimpleLoginModule required;
};
Changing the class name here (to a wrong one) will make tomcat say it can't find that one, which eliminates the cause "the conf file isn't being picked up".
The class should be in the classpath: it's inside a jar in the lib folder of the WAR.
What could I be missing?
回答1:
As @Jim pointed out, the package name was not correct: security.jaas, not security.jass.
Goes to prove you really need to pay attention to details.
回答2:
Can ssomrone tell me the difference between those two class paths? I can't see it. EDIT WOW that obvious, but that slippery as well - Two 's' chars vs two 's' chars.
来源:https://stackoverflow.com/questions/11804075/why-is-tomcat7-unable-to-find-loginmodule-class-in-jaas