wood burning stoves
The moose likes Tomcat and the fly likes Unable to find LoginModule class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Unable to find LoginModule class" Watch "Unable to find LoginModule class" New topic

Unable to find LoginModule class

Michel de Jong

Joined: Apr 25, 2005
Posts: 2

Hi Java Guru's,

I am using a Java application compiled with version 1.4.2_05 running on Tomcat 5.0.28. I need to move this application to a new server running OpenJDK 1.6.0_20 and Tomcat 5.5.23. I unfortunately do not have the source :-(
The application uses a custom login module to authenticate via a Radius server.

So I have deployed the WAR on the new server, created a jaas.conf and added ' -Djava.security.auth.login.config==$CATALINA_HOME/conf/jaas.conf' to the Tomcat configuration file. However I keep getting this error.
javax.security.auth.login.LoginException: unable to find LoginModule class: jaas.RadiusLoginModule

The class 'RadiusLoginModule' is present in the application in the directory jaas. So Tomcat should be able to find the class right? I am probably doing something wrong. But I cannot see what. I added my jaas.conf and context.xml.


JRadiusClientLoginModule {
jaas.RadiusLoginModule required


<Context path="/application" reloadable="true" debug="0" privileged="true">
<Realm className="org.apache.catalina.realm.JAASRealm"

If more information is required please let me know. I hope somebody can point me in the right direction ;-)

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Welcome to the JavaRanch, Michel!

If your app requires Tomcat 5 and Java 1.4 and you have no source code, your worries are just beginning. Both of the preceeding are obsolete and Java 1.4 is beyond End-of-Life.

Tomcat's security Realms operate as part of the Tomcat server and not as part of the webapp. So having the Radius class in the WAR won't help any - it won't be in Tomcat's personal classpath.

You can copy this class out to the tomcat server lib directory, but something is amiss if the app ever expected things to work as things are so I can't guarantee results.

An IDE is no substitute for an Intelligent Developer.
Michel de Jong

Joined: Apr 25, 2005
Posts: 2

Hey Tim,

Thank you so much for the quick reply. Regarding moving from Java 1.4, I was already afraid you where going to say that...

I will try putting the class in the lib directory and let you know how this worked out.

With kind regards,

I agree. Here's the link: http://aspose.com/file-tools
subject: Unable to find LoginModule class
It's not a secret anymore!