• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to get JAAS working with embedded Tomcat 6.0.45  RSS feed

 
Tom Moorehead
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting the following error when trying to access a resource:

org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
javax.security.auth.login.LoginException: No LoginModules configured for Catalina
at javax.security.auth.login.LoginContext.init(LoginContext.java:272)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:425)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:393)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:334)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:612)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:503)
at java.lang.Thread.run(Thread.java:744)

I have the following in server.xml (inside Engine):

I also am attempting to use (inside Host):

in my jaas.conf file I have:
CustomLogin {
    com.mms.Tomcat.RMLoginModule sufficient;
};

The com.mms... files have all been defined in Java.

Finally, in web.xml I have the following:

Does anyone have any idea what I'm missing or doing wrong???


 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Javaranch, Tom!

I don't believe that the server.xml file is processed when you run embedded Tomcat. Typically embedded Tomcat is when you instantiate the Tomcat POJO and run it.

The normal Catalina startup runs the Apache Digester to parse server.xml and apply its property values to the Tomcat POJO and its satellites, but I think that running embedded means that you have to do your own property injections. Which you could do by setting up your own Digester and making it parse a server.xml file, or use whatever property value source(s) you prefer.
 
Tom Moorehead
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah...  Thanks! Got past this hurdle...
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!