Examples of UserDatabaseException


Examples of com.adito.security.UserDatabaseException

                                        .getString("fullname"), results.getDate("last_password_change"),
                                        UserDatabaseManager.getInstance().getRealm(results.getInt("realm_ID")));
                        addRoles(user);
                        return user;
                    } catch (Exception e) {
                        throw new UserDatabaseException("Failed to get user realm.");
                    }
        }
      } finally {
        results.close();
      }
    } catch (UserDatabaseException ude) {
      throw ude;
    } catch (SQLException ex) {
      throw new UserDatabaseException("Failed to execute SQL query", ex);
    } catch (ClassNotFoundException ex) {
      throw new UserDatabaseException("Failed to execute SQL query", ex);
    } finally {
      try {
        if (ps != null) {
          ps.releasePreparedStatement();
        }
View Full Code Here

Examples of com.adito.security.UserDatabaseException

              }
            } finally {
              ps.releasePreparedStatement();
            }
        } catch (Exception e) {
            throw new UserDatabaseException("failed to get all users", e);
        }
  }
View Full Code Here

Examples of com.adito.security.UserDatabaseException

        }
      } finally {
        ps.releasePreparedStatement();
      }
    } catch (Exception ex) {
      throw new UserDatabaseException("Failed to execute SQL query", ex);
    }
  }
View Full Code Here

Examples of com.adito.security.UserDatabaseException

        ps.setString(2, username);
        ps.setInt(3, realm.getResourceId());
      }
      ps.execute();
    } catch (Exception e) {
      throw new UserDatabaseException(
          "Failed to change password for user " + username + " in realm " + realm + ".");
    } finally {
      if (ps != null) {
        try {
          ps.releasePreparedStatement();
View Full Code Here

Examples of com.adito.security.UserDatabaseException

                }
            } finally {
                ps.releasePreparedStatement();
            }
        } catch (Exception e) {
            throw new UserDatabaseException("failed to get all roles", e);
        }
  }
View Full Code Here

Examples of com.adito.security.UserDatabaseException

      }
      Role[] r = new Role[roles.size()];
      roles.toArray(r);
      u.setRoles(r);
    } catch (Exception e) {
      throw new UserDatabaseException("Failed to add roles to user.", e);
    } finally {
      if (ps != null) {
        try {
          ps.releasePreparedStatement();
        } catch (SQLException e) {
View Full Code Here

Examples of com.adito.security.UserDatabaseException

                    Pattern p = Pattern.compile(pattern);
                    if (!p.matcher(newPassword).matches()) {
                        errors.add(Globals.ERROR_KEY, new ActionMessage("setPassword.error.doesNotMatchPolicy"));
                    }
                } catch (Exception e) {
                    throw new UserDatabaseException("Could not check password against current policy.", e);
                }
            }
        } catch (Exception e) {
            errors.add(Globals.ERROR_KEY, new ActionMessage("setPassword.error.validateFailed", e.getMessage()));
        }
View Full Code Here

Examples of com.sslexplorer.security.UserDatabaseException

            log.debug("RADIUS Validation SUCCEEDED!");
            try {
                User user = CoreServlet.getServlet().getUserDatabase().getAccount(null, username);
                return user;
            } catch (Exception e) {
                throw new UserDatabaseException("Failed to get user account.", e);
            }
        }else{
            log.warn("RADIUS Validation FAILED!");
            throw new InvalidLoginCredentialsException("Bad username or password.");
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.