2 Replies Latest reply on May 2, 2005 8:42 AM by Marc Roy Olsen

    SQL in Principals query will not work

    Marc Roy Olsen Newbie

      Im using the jbosssx serurity modul for my web login. And have teste it with some basic database and sql.
      But when I'm trying to move it to a prodution database and use a slidy more "advance" SQL it will not work.

      The basic sql(from login-config.xml):

      <module-option name = "principalsQuery">select password from users where username=?</module-option>

      The slidely more "advance":
      <module-option name = "principalsQuery">select pri.password from m_bruger bru, m_primed pri where pri.uid = bru.uid and bru.wdk=?</module-option>

      I know my sql is working and returning just the password. But still I get this error, when trying to looking in to me webmodul:
      11:26:26,433 INFO [STDOUT] javax.security.auth.login.FailedLoginException: No matching username found in Principals

      What im I missing or can't I use a query like the one I use in the principals query