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.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web9

  • via Oracle Community by cupahjoe, 11 months ago
    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
  • Unable to connect to datasource com.pstt.ejb.facade.jaas.LoginManagerFacadeRemote for database user.
  • via Oracle Community by vincentphuah, 11 months ago
    Login failed: javax.security.auth.login.LoginException: Failed file login for admin.
  • Stack trace

    • 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. 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) at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.authenticate(JDBCRealm.java:299) at com.sun.enterprise.security.auth.login.JDBCLoginModule.authenticate(JDBCLoginModule.java:72) at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:90) at com.sun.appserv.security.AppservPasswordLoginModule.login(AppservPasswordLoginModule.java:184) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) at javax.security.auth.login.LoginContext.login(LoginContext.java:579) at com.sun.enterprise.security.auth.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:295) at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:170) at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:123) at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:479) at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:419) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:253) at org.apache.catalina.authenticator.AuthenticatorBase.processSecurityCheck(AuthenticatorBase.java:1011) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:622) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:609) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.ClassCastException: org.hibernate.impl.SessionFactoryImpl at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.getConnection(JDBCRealm.java:467)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.