users@glassfish.java.net

Re: JAAS jdbcRealm error

From: <glassfish_at_javadesktop.org>
Date: Tue, 02 Oct 2007 11:40:38 PDT

[#|2007-10-02T15:45:40.226+0200|FINE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=17;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=allocateConnection;jdbc/userauth;_RequestID=1e5ef86e-a462-40d1-82f9-f0b67d9bc313;|RAR5036:Resource reference is not defined for JNDI name [jdbc/userauth]|#]

[#|2007-10-02T15:45:40.226+0200|FINE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=17;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;_RequestID=1e5ef86e-a462-40d1-82f9-f0b67d9bc313;|returning the connector registry|#]


---- It looks like the server thinks the "jdbc/userauth" is a connector.
I saw zero logged messages from jdbcRealm

Instead of spending lots of time debugging the reasons for this, you can just repeat the setup ike so:

in Admin GUI:

Use a different name: "xyz"
create a new [b]jdbc[/b] connection pool ("xyz"). (Resources/JDBC/Connection Pool)
Ping the database, look on disk to verify a new directory was created.

Add a resource-reference (Resources/JDBC/JDBC Resources)
name it "jdbc/xyz"

create or edit the realm:
name: "userauth"
IMPORTANT: set digest algorithm to "MD5" (no quotes)
IMPORTANT: the classname has to be JDBCRealm

Fill in fields -- username, password, digest alogrithm: Here are the table/column names

USERTABLE contains USERID and PASSWORD
GROUPTABLE contains USERID and GROUPID
jndi --> "jdbc/xyz"

[b]restart the server! [/b]

run AuthAdmin

next time you have an error please attach server.log and domain.xml
[Message sent by forum member 'bnevins' (bnevins)]

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