0 Replies Latest reply on May 29, 2007 5:45 AM by eblom

    Query fails in the Util class used by the DatabaseServerLogi

    eblom

      I'm using the DatabaseServerLoginModule in my project and when the Util class is executing my query it fails.

      The code that is failing in the Util class, method: static Group[] getRoleSets(String username, String dsJndiName, String rolesQuery, AbstractServerLoginModule aslm, boolean suspendResume):

      code:
      do
      {
      String name = rs.getString(1);
      String groupName = rs.getString(2); // Throws exception

      If I comment the code:
      String groupName = null // rs.getString(2);

      Then it will work.

      Is this a bug? The query is working; the problem is when the code will fetch the result.

      I'm using the following query:
      SELECT accessprivileges.privilegename FROM securityprofileprivileges
      INNER JOIN accessprivileges ON (securityprofileprivileges.privilegeid=accessprivileges.privilegeid)
      INNER JOIN securityprofiles ON (securityprofileprivileges.securityprofileid=securityprofiles.securityprofileid)
      INNER JOIN users ON (users.securityprofileid=securityprofiles.securityprofileid) WHERE userid=?


      /Magnus