• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to find LoginModule class

 
Greenhorn
Posts: 2
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

jaas.conf

JRadiusClientLoginModule {
jaas.RadiusLoginModule required
};

META-INF/context.xml

<Context path="/application" reloadable="true" debug="0" privileged="true">
<Realm className="org.apache.catalina.realm.JAASRealm"
debug="99"
appName="JRadiusClientLoginModule"
userClassNames="jaas.RadiusPrincipal"
roleClassNames="jaas.RolePrincipal">
</Realm>
</Context>


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

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Michel de Jong
Greenhorn
Posts: 2
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,

Michel
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic