Why is tomcat7 unable to find LoginModule class in JAAS

一笑奈何 提交于 2020-01-07 02:19:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!