javax.security.auth.login.LoginException

Unable to connect to datasource jdbc/securityDataSource for database user null.

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web115

  • via Stack Overflow by user128806
    ,
  • Stack trace

    • javax.security.auth.login.LoginException: Unable to connect to datasource jdbc/securityDataSource for database user null. at com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm.getConnection(JDBCRealm.java:585) at com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm.isUserValid(JDBCRealm.java:408) at com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm.authenticate(JDBCRealm.java:324) at com.sun.enterprise.security.ee.auth.login.JDBCLoginModule.authenticate(JDBCLoginModule.java:78) at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:116) at com.sun.enterprise.security.BasePasswordLoginModule.login(BasePasswordLoginModule.java:146) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/securityDataSource' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__nontx, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: securityDataSource not found] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438) at javax.naming.InitialContext.lookup(InitialContext.java:411) at javax.naming.InitialContext.lookup(InitialContext.java:411) Caused by: javax.naming.NameNotFoundException: securityDataSource not found at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208) at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66) at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)

    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

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    16 more bugmates