8 Replies Latest reply on Jun 22, 2006 5:52 PM by Tamir Efron

    Using DatabaseServerLoginModule gives Login failure

    Tamir Efron Newbie

      Hi,
      I was able to login with UsersRolesLoginModule using properties files.
      However, when trying to use DatabaseServerLoginModule, the login fail with:

      javax.security.auth.login.LoginException: java.lang.NullPointerException
       at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword



      here is the server.log:

      13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] REQUEST URI =/ENETEmployer/j_security_check
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] authType=null
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] characterEncoding=null
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contentLength=55
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contentType=application/x-www-form-urlencoded
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contextPath=/ENETEmployer
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] cookie=JSESSIONID=F649DD73DB967F2CDFAFC86E5A67A7BC
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=referer=https://localhost:8447/ENETEmployer/
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=accept-language=en-ca,fr-ca;q=0.8,fr;q=0.6,en-us;q=0.4,he;q=0.2
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=content-type=application/x-www-form-urlencoded
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=accept-encoding=gzip, deflate
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=host=localhost:8447
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=content-length=55
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=connection=Keep-Alive
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=cache-control=no-cache
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=cookie=JSESSIONID=F649DD73DB967F2CDFAFC86E5A67A7BC
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] locale=en_CA
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] method=POST
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] parameter=j_username=user1
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] parameter=j_password=1
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] parameter=form1:logonButton=Login
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] pathInfo=null
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] protocol=HTTP/1.1
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] queryString=null
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] remoteAddr=127.0.0.1
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] remoteHost=127.0.0.1
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] remoteUser=null
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] requestedSessionId=F649DD73DB967F2CDFAFC86E5A67A7BC
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] scheme=https
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] serverName=localhost
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] serverPort=8447
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] servletPath=/j_security_check
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] isSecure=true
      2006-06-13 08:55:15,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] ---------------------------------------------------------------
      2006-06-13 08:55:15,427 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] Process request for '/ENETEmployer/j_security_check'
      2006-06-13 08:55:15,427 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] Checking for SSO cookie
      2006-06-13 08:55:15,427 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] SSO cookie is not present
      2006-06-13 08:55:15,427 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Security checking request POST /ENETEmployer/j_security_check
      2006-06-13 08:55:15,427 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] Authenticating username 'user1'
      2006-06-13 08:55:15,427 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] Begin authenticate, username=user1
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] Begin isValid, principal:user1, cache info: null
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] defaultLogin, principal=user1
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] Begin getAppConfigurationEntry(enetemployer), size=9
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] End getAppConfigurationEntry(enetemployer), authInfo=AppConfigurationEntry[]:
      [0]
      LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
      ControlFlag: LoginModuleControlFlag: required
      Options:name=rolesQuery, value=select userRoles, 'Roles' from UserRoles where username=?
      name=principalsQuery, value=select passwd from Users username where username=?
      name=dsJndiName, value=java:/MySqlDS
      
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] initialize, instance=@26896644
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=java:/MySqlDS
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] principalsQuery=select passwd from Users username where username=?
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] rolesQuery=select userRoles, 'Roles' from UserRoles where username=?
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendResume=true
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] login
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendAnyTransaction
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] resumeAnyTransaction
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] abort
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] Login failure
      javax.security.auth.login.LoginException: java.lang.NullPointerException
       at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
       at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
       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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
       at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
       at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
       at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:491)
       at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:257)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:416)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
       at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
       at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      
       at javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
       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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
       at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
       at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
       at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:491)
       at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:257)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:416)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
       at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
       at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      2006-06-13 08:55:15,427 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] End isValid, false
      2006-06-13 08:55:15,427 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] User: user1 is NOT authenticated
      2006-06-13 08:55:15,427 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] End authenticate, principal=null
      2006-06-13 08:55:15,443 DEBUG [org.apache.catalina.core.ApplicationDispatcher] servletPath=/eNETLoginError.html, pathInfo=null, queryString=null, name=null
      2006-06-13 08:55:15,443 DEBUG [org.apache.catalina.core.ApplicationDispatcher] Path Based Forward
      2006-06-13 08:55:15,443 TRACE [org.jboss.web.tomcat.security.RunAsListener] default, runAs: null
      2006-06-13 08:55:15,443 TRACE [org.jboss.web.tomcat.security.RunAsListener] default, runAs: null
      2006-06-13 08:55:15,443 TRACE [org.jboss.web.tomcat.security.RunAsListener] default, runAs: null
      2006-06-13 08:55:15,443 TRACE [org.jboss.web.tomcat.security.RunAsListener] default, runAs: null
      2006-06-13 08:55:15,443 DEBUG [org.apache.catalina.core.ApplicationDispatcher] Disabling the response for futher output
      2006-06-13 08:55:15,443 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Failed authenticate() test ??/ENETEmployer/j_security_check
      2006-06-13 08:55:15,443 TRACE [org.jboss.security.SecurityAssociation] clear, server=true
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] ---------------------------------------------------------------
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] authType=null
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contentLength=6425
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contentType=text/html
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=ETag=W/"6425-1150128244000"
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=Last-Modified=Mon, 12 Jun 2006 16:04:04 GMT
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] message=null
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] remoteUser=null
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] status=200
      2006-06-13 08:55:15,443 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] ===============================================================


      I am using MySql database. I added and updated the mysql-ds.xml and configured the login config.xml:

      <application-policy name = "enetemployer">
       <authentication>
       <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
       flag = "required">
       <module-option name="dsJndiName">java:/MySqlDS</module-option>
       <module-option name="principalsQuery">select passwd from Users username where username=?</module-option>
       <module-option name="rolesQuery">select userRoles, 'Roles' from UserRoles where username=?</module-option>
       </login-module>
       <!--login-module -- this one works: code="org.jboss.security.auth.spi.UsersRolesLoginModule"
       flag = "required">
       <module-option name="usersProperties">props/enetemployer-users.properties</module-option>
       <module-option name="rolesProperties">props/enetemployer-roles.properties</module-option>
       </login-module-->
       <!--login-module code="org.jboss.security.ClientLoginModule"
       flag = "required"/-->
       </authentication>
       </application-policy>




      I am getting the same result for users that exist or dont exist in the database.


      Please help if you can.
      Thanks,
      TEFRON


        • 1. Re: Using DatabaseServerLoginModule gives Login failure
          chris griffith Expert

          TEFRON,

          1) check that your datasource is being deployed correctly

          2) double check that your queries are correct.

          cgriffith

          • 2. Re: Using DatabaseServerLoginModule gives Login failure
            Tamir Efron Newbie

            Hi,
            Thanks for the suggestions...

            I checked 1 and 2 and it seems to follow the manuel.

            I saw that the line:

            DataSource ds = (DataSource) ctx.lookup("java:/MySqlDS");

            in getUsersPassword, returns null.


            mysql-ds.xml in the deploy folder:

            <datasources>
             <local-tx-datasource>
             <jndi-name>MySqlDS</jndi-name>
            <use-java-context>true</use-java-context>
            
             <connection-url>jdbc:mysql://host:3306/mydb</connection-url>
             <!--driver-class>org.gjt.mm.mysql.Driver</driver-class-->
             <driver-class>com.mysql.jdbc.Driver</driver-class>
             <user-name>me</user-name>
             <password>secret</password>
             <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
             <!-- should only be used on drivers after 3.22.1 with "ping" support
             <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
             -->
             <!-- sql to call when connection is created -->
            
             <!--new-connection-sql>xxx</new-connection-sql-->
             <!-- -->
             <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
             <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
             -->
            <!--security-domain>enetemployer</security-domain-->
             <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
             <metadata>
             <type-mapping>mySQL</type-mapping>
             </metadata>
             </local-tx-datasource>
            </datasources>




            I can see the MySqlDS MBean using th jmx-console the bind name property: java:MySqlDS but still cannot be found.
            If I set use-java-context to false and lookup without the java:/ I gett stack overfllow...

            any insight will be greatlly appreciated.

            Thanks,
            TEFRON.


            • 3. Re: Using DatabaseServerLoginModule gives Login failure
              chris griffith Expert

              tefron,

              look very closely at the JNDI name set for your datasource, and the one used by loginmodule.

              enjoy, cgriffith

              • 4. Re: Using DatabaseServerLoginModule gives Login failure
                Tamir Efron Newbie

                I am not sure why this DatabaseServerLoginModule didn't like to work for me. All the naming seem to match the admin-guide. I used a "Custom Login Module" instead and every think works great.
                Thanks,
                TEFRON

                • 5. Re: Using DatabaseServerLoginModule gives Login failure
                  chris griffith Expert

                  Tefron,

                  I did not read your configurations correctly the first time. Sorry. I always bind my datasources as "jdbc/datasource".

                  I any case, One usefull tool is the JNDI view provided by jmx-console. You can check to see if datasource is bound to what you expect. Let us know.

                  cgriffith

                  • 6. Re: Using DatabaseServerLoginModule gives Login failure
                    Tamir Efron Newbie

                    Nice tool!!!
                    Yes it is bound to what I expect.
                    I also tried to bind in to jdbc/datasource with the same results:
                    1. fail to find it under java name space.
                    2. under global jndi namespace it finds the datasource but the next line

                    conn = ds.getConnection();


                    result in stack overflow:

                    Here is a small portion of the stack:

                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.SecurityAssociation] getPrincipal, principal=null
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] Begin isValid, principal:null, cache info: null
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] defaultLogin, principal=null
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] Begin getAppConfigurationEntry(enetemployer), size=9
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] End getAppConfigurationEntry(enetemployer), authInfo=AppConfigurationEntry[]:
                    [0]
                    LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
                    ControlFlag: LoginModuleControlFlag: required
                    Options:name=rolesQuery, value=select userRoles, 'Roles' from UserRoles where username=?
                    name=principalsQuery, value=select passwd from Users username where username=?
                    name=dsJndiName, value=jdbc/datasource
                    
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] initialize, instance=@6391841
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=jdbc/datasource
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] principalsQuery=select passwd from Users username where username=?
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] rolesQuery=select userRoles, 'Roles' from UserRoles where username=?
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendResume=true
                    2006-06-16 13:35:33,637 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] login
                    2006-06-16 13:35:33,715 TRACE [org.jboss.security.plugins.JaasSecurityManager.enetemployer] Login failure
                    javax.security.auth.login.LoginException: java.lang.StackOverflowError
                     at org.jboss.security.auth.callback.SecurityAssociationHandler.getPassword(SecurityAssociationHandler.java:159)
                     at org.jboss.security.auth.callback.SecurityAssociationHandler.handle(SecurityAssociationHandler.java:108)
                     at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(LoginContext.java:955)
                     at java.security.AccessController.doPrivileged(Native Method)
                     at javax.security.auth.login.LoginContext$SecureCallbackHandler.handle(LoginContext.java:951)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.getUsernameAndPassword(UsernamePasswordLoginModule.java:280)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:181)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                     at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:571)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:378)
                     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
                     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                     at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
                     at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
                     at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                     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 org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
                     at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
                    




                    TEFRON

                    • 7. Re: Using DatabaseServerLoginModule gives Login failure
                      chris griffith Expert

                      So working backwards...

                      Do you have jndi properties set correctly in you web application?

                      cgriffith

                      • 8. Re: Using DatabaseServerLoginModule gives Login failure
                        Tamir Efron Newbie

                        Now it is finally able to lookup the datasource - apperantlly the isolated flag prevented it from finiding the datasource.

                        However, I still need this flag to prevent other null pointer exceptions.

                        Any suggestions.
                        P.S. I thied to use the full lookup jnp:localhost:1099/java:/jdbc/datasource
                        with the flag set, but it still couldn't locate it...

                        Thanks,
                        Tamir