• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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.
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic