users@glassfish.java.net

Re: JDBC Realm stops working after first login

From: <glassfish_at_javadesktop.org>
Date: Mon, 14 Jan 2008 02:08:13 PST

>
> [b]Cannot validate user
> com.sun.enterprise.security.LoginException: Unable to
> connect to datasource jdbc/komodo_G3 for database
> user null.[/b]
> at
> com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.
> getConnection(JDBCRealm.java:479)
> at
> com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.
> isUserValid(JDBCRealm.java:321)

The above exception seems to be because the db-user property is not set in your Realm Configuration.

> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorker
> Thread.run(SSLWorkerThread.java:106)
> [b]Caused by: java.lang.ClassCastException:
> org.hibernate.impl.SessionFactoryImpl
> at
> com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.
> getConnection(JDBCRealm.java:467)[/b]
> ... 45 more
> t sure what the interaction is between Hibernate and
> the JDBCRealm.getConnection() method.

I have asked our hibernate expert, will get back once i hear from him.

Thanks.
[Message sent by forum member 'kumarjayanti' (kumarjayanti)]

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