This content has been marked as final.
Show 4 replies
-
1. Re: jdbcRealm - ClassCastException when trying to log in
wolfgangknauf Feb 25, 2009 10:33 AM (in response to mendret)Hi,
you should not use Tomcat methods to handle security but JBoss methods.
To do this:
1) Add a file "WEB-INF\jboss-web.xml" to your web project with this content (a security domain is configured, which is something similar to your realm):<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd"> <jboss-web> <security-domain>mysecuritydomain</security-domain> ... </jboss-web>
2) Configure a login module for this security domain. As your user data seems to be defined in a database, use a "org.jboss.security.auth.spi.DatabaseServerLoginModule":
http://www.jboss.org/community/docs/DOC-9511
Hope this is enough to get started.
Wolfgang -
2. Re: jdbcRealm - ClassCastException when trying to log in
mendret Feb 26, 2009 3:16 AM (in response to mendret)thanks for the tip, will try that, but shouldn't it be posible to use tomcat security methods as well? as far as i know tomcat is a core component of jboss, or am i wrong there?
-
3. Re: jdbcRealm - ClassCastException when trying to log in
wolfgangknauf Feb 26, 2009 11:23 AM (in response to mendret)Hi,
sorry, but the answer to this question is beyond my knowledge ;-).
I just wanted to provide you with a solution that works for me, and the ClassCastException sounds as if those two authentication methods don't work together.
Best regards
Wolfgang -
4. Re: jdbcRealm - ClassCastException when trying to log in
ericci Aug 29, 2011 9:43 AM (in response to mendret)Hello! I have the same problem. Any idea?
Regards