3 Replies Latest reply on Mar 6, 2003 9:50 AM by Peter Doornbosch

    DatabaseServerLoginModule -> difficulties

    Mike Wazowski Newbie

      Hi,

      I have some big trouble with the DatabaseServerLoginModule. I'm using JBoss 3.0.4.

      The connection to the database works fine. I tested it without a JAAS-module.

      My login-config.xml
      ---------------------------------------------------------
      ...
      <application-policy name = "mydb">

      <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
      <module-option name="dsJndiName">java:/MSSQLDS</module-option>
      <module-option name="principalsQuery">select passwort from TestEJB where username=?</module-option>
      <module-option name="rolesQuery">select role from TestEJB where username=?</module-option>
      </login-module>

      </application-policy>
      ...
      ---------------------------------------------------------

      My jboss.xml
      ---------------------------------------------------------
      ...
      <container-configuration>
      <container-name>Standard Stateless SessionBean</container-name>
      <security-domain>java:/jaas/mydb</security-domain>
      </container-configuration>
      ...
      ---------------------------------------------------------
      This error occurs when I try to start a Bean:
      ERROR [SecurityInterceptor] Authentication exception, principal=null

      Any ideas what do I have to change? I read a lot tutorials but there is no further information what else I can do?!

      thx mike :o)