This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jboss and Jaas: where do I go wrong?

 
erika santo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody

I'm new in this forum and I'm a newby. I'm stuck from a couple of days and really need some help.

I am using Jboss 5.1, java 1.6 and I'm developing a web application that needs login.
I'd like to uso JAAS functionality so this is what I have done:

- I wrote my own LoginModule and my own Principal
- Modified the jboss-web.xml as follows:
<security-domain>java:/jaas/LoginModuleRDS</security-domain>


- Modified the login-conf.xml in jbossdirectory/server/default/conf as follows:
<application-policy name="LoginModuleRDS">
<authentication>
<login-module code="security.HibernateLoginModule"
flag="required">
<module-option name="restore-login-identity">true</module-option>

</login-module>
</authentication>
</application-policy>


and deployed.

When I run the application I correctly see the log-in page.
My LoginModule is correctly called and correctly executed but then I get the following error:

The first 5 lines are logs that i'll delete as soon as i get this working.


17:02:52,671 INFO [HibernateLoginModule] MyLoginModule-initialize
17:02:52,671 INFO [HibernateLoginModule] MyLoginModule-dentro al login
17:02:52,671 INFO [HibernateLoginModule] MyLoginModule-dentro a validate2
17:02:52,692 INFO [HibernateLoginModule] MyLoginModule-dentro a validate
17:02:52,693 INFO [HibernateLoginModule] MyLoginModule-dentro a commit
17:02:52,708 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.catalina.session.StandardSession.setNote(StandardSession.java:907)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:282)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)


Can anybody please give an hint of where am I going wrong... Any help woud truly be appriciated!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic