| Author |
Login Exception when using JDBC Realm (Glassfish V3.1 + IceFaces 2 + MySQL)
|
Philip Gutierrez
Greenhorn
Joined: Apr 24, 2007
Posts: 13
|
|
Hi guys,
I am having this weird error when trying to login in using container-managed security using a JDBC Realm, basically was happens is that even though the JDBC realm is set to my login config, it still uses the file realm.
I searching the internet for help, they didn't work for me.
Here's my configuration:
My Login Page:
web.xml security definition:
sun-web.xml security role mapping:
my database table:
My realm configuration:
My Connection Pool Settings:
theRealmPool
Here's the exception:
I was expecting to receive a LoginException: Failed jdbc login for admin
Any suggestion will help.
|
 |
Udara Amarasinghe
Ranch Hand
Joined: Aug 17, 2009
Posts: 109
|
|
Hi Philip,
Did you create appropriate JDBC Connection pool and JDBC Resource in glass fish server. That have connections with your database and JDBC realm?
|
 |
Philip Gutierrez
Greenhorn
Joined: Apr 24, 2007
Posts: 13
|
|
I fix the problem about detecting the file realm only, I made sure that the JDBC Pool properties are correct and the JNDI name is proper.
But I now get a new exception.
Do I need to create a custom Login Module for this?
Thanks for replying on my post.
|
 |
Udara Amarasinghe
Ranch Hand
Joined: Aug 17, 2009
Posts: 109
|
|
Hi Philip ,
In your JDBCRealm settings JAAS context type should be either jdbcRealm or jdbcDigestRealm(this have to use only when authentication method is DIGEST).
try this and tell what happens..
|
 |
Philip Gutierrez
Greenhorn
Joined: Apr 24, 2007
Posts: 13
|
|
Man, I though JAAS Context property was just a unique name for the realm. Silly me.
Thanks for the info.
|
 |
 |
|
|
subject: Login Exception when using JDBC Realm (Glassfish V3.1 + IceFaces 2 + MySQL)
|
|
|