com.sun.enterprise.security.LoginException: Unable to connect to datasource jdbc/komodo_G3 for database user null. Why this only happens after the first user logs in, I don't know. Here's the full set of error messages around the login failure: [#|2008-01-11T04:03:07.028-0500|FINEST|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-1208 0-0;ClassName=com.sun.enterprise.security.auth.LoginContextDriver;MethodName=login;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Processing login with credentials of type: class com.sun.enterprise.security.auth.login.PasswordCredential|#] [#|2008-01-11T04:03:07.028-0500|FINE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-12080- 0;ClassName=com.sun.enterprise.security.auth.LoginContextDriver;MethodName=doPasswordLogin;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Log ging in user [komodo] into realm: GeckoRealm using JAAS module: jdbcRealm|#] [#|2008-01-11T04:03:07.028-0500|FINE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-12080- 0;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=initialize;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Login mo dule initialized: class com.sun.enterprise.security.auth.login.JDBCLoginModule|#] [#|2008-01-11T04:03:07.029-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-1208 0-0;komodo;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|SEC1112: Cannot validate user [komodo] for JDBC realm.|#] [#|2008-01-11T04:03:07.030-0500|FINE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-12080- 0;ClassName=com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm;MethodName=isUserValid;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Canno t validate user com.sun.enterprise.security.LoginException: Unable to connect to datasource jdbc/komodo_G3 for database user null.

Oracle Community | cupahjoe | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    JDBC Realm stops working after first login

    Oracle Community | 9 years ago | cupahjoe
    com.sun.enterprise.security.LoginException: Unable to connect to datasource jdbc/komodo_G3 for database user null. Why this only happens after the first user logs in, I don't know. Here's the full set of error messages around the login failure: [#|2008-01-11T04:03:07.028-0500|FINEST|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-1208 0-0;ClassName=com.sun.enterprise.security.auth.LoginContextDriver;MethodName=login;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Processing login with credentials of type: class com.sun.enterprise.security.auth.login.PasswordCredential|#] [#|2008-01-11T04:03:07.028-0500|FINE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-12080- 0;ClassName=com.sun.enterprise.security.auth.LoginContextDriver;MethodName=doPasswordLogin;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Log ging in user [komodo] into realm: GeckoRealm using JAAS module: jdbcRealm|#] [#|2008-01-11T04:03:07.028-0500|FINE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-12080- 0;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=initialize;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Login mo dule initialized: class com.sun.enterprise.security.auth.login.JDBCLoginModule|#] [#|2008-01-11T04:03:07.029-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-1208 0-0;komodo;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|SEC1112: Cannot validate user [komodo] for JDBC realm.|#] [#|2008-01-11T04:03:07.030-0500|FINE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=19;_ThreadName=httpSSLWorkerThread-12080- 0;ClassName=com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm;MethodName=isUserValid;_RequestID=0eb67820-9ba6-4b42-88e7-7f7a22c68341;|Canno t validate user com.sun.enterprise.security.LoginException: Unable to connect to datasource jdbc/komodo_G3 for database user null.

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.hibernate.impl.SessionFactoryImpl

      at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.getConnection()
    2. Security Core Classes
      JDBCRealm.getConnection
      1. com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.getConnection(JDBCRealm.java:467)
      1 frame