• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Login Exception when using JDBC Realm (Glassfish V3.1 + IceFaces 2 + MySQL)

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 109
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 109
Netbeans IDE Oracle Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Man, I though JAAS Context property was just a unique name for the realm. Silly me.

Thanks for the info.
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic