users@glassfish.java.net

Re: JAAS jdbcRealm error

From: <glassfish_at_javadesktop.org>
Date: Tue, 09 Oct 2007 12:47:27 PDT

When you create the realm you tell GlassFish what the names of the tables and columns are in YOUR database. They can be anything you like, but they had better match the names in your database.

JDBCRealm will use the values you entered at runtime.

Once you have everything setup there are about a BILLION ways that you could have screwed up - the table names and column names had a typo, you forgot to start the DB, the connection pool has the wrong driver class, and on and on and on and on ;-)

I recommend looking through my 2 blogs referenced elsewhere in this thread.

I found it useful to step through the JDBCRealm code. If you do that you will quickly find out a lot of information about where you are failing. JDBCRealm has an annoying habit of squealching SQLExceptions. If you turn logging to FINE you will see SQLExceptions during attempts at authentication.

JDBCRealm:

com.sun.enterprise.security.auth.realm.jdbc.JDBRealm

it is in the appserv-core module
[Message sent by forum member 'bnevins' (bnevins)]

http://forums.java.net/jive/thread.jspa?messageID=239192