Package org.wso2.carbon.user.core

Examples of org.wso2.carbon.user.core.UserStoreException


            DatabaseUtil.rollBack(dbConnection);

      String msg = "Error in activating the tenant with " + "tenant id: "
          + tenantId + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
      DatabaseUtil.closeAllConnections(dbConnection,prepStmt);
    }
  }
View Full Code Here


            DatabaseUtil.rollBack(dbConnection);

      String msg = "Error in deactivating the tenant with " + "tenant id: "
          + tenantId + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
      DatabaseUtil.closeAllConnections(dbConnection,prepStmt);
    }
  }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);

      String msg = "Error in getting the tenant status with " + "tenant id: "
          + tenantId + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
      DatabaseUtil.closeAllConnections(dbConnection,prepStmt);
    }
    return false;
  }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);
           
      String msg = "Error in deleting the tenant with " + "tenant id: "
          + tenantId + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
            DatabaseUtil.closeAllConnections(dbConnection,prepStmt);
    }
  }
View Full Code Here

        this.tenantID=tenantId;

        if (!"true".equals(realmConfig.getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_READ_ONLY))
                && this.realmConfig.getUserStoreClass()
                        .equals(LDAPUserStoreManager.class.getName())) {
            throw new UserStoreException(
                    "LDAPUserStoreManager is unable to operate in Read-Write mode." +
                            " This is invalid configuration. It can only operate in ReadOnly mode");
        }
        checkRequiredUserStoreConfiguration();
        dataSource = (DataSource) properties.get(UserCoreConstants.DATA_SOURCE);
        if (dataSource == null) {
            dataSource = DatabaseUtil.getRealmDataSource(realmConfig);
            properties.put(UserCoreConstants.DATA_SOURCE, dataSource);
        }
        if (dataSource == null) {
            throw new UserStoreException("Data Source is null");
        }

        hybridRoleManager = new HybridRoleManager(dataSource, tenantId, realmConfig, userRealm);
        //obtain the ldap connection source that was created in DefaultRealmService.
        this.connectionSource=(LDAPConnectionContext)properties.get(
                UserCoreConstants.LDAP_CONNECTION_SOURCE);

        try {
            connectionSource.getContext();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(
                    "Cannot create connection to Active directory server. Error message "
                            + e.getMessage());
        }
        this.realm = realm;
        this.checkInitialData();
View Full Code Here

            } catch (NamingException e) {
                String errorMsg = "Error occurred while adding the organizational unit " +
                                  "sub context.";
                logger.error(errorMsg, e);
                throw new UserStoreException(errorMsg, e);
            }
        }
    }
View Full Code Here

            if (name != null) {
                bValue = this.bindAsUser(name, (String) credential);
            }
        } catch (NamingException e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(e.getMessage(), e);
        }

        return bValue;
    }
View Full Code Here

            } catch (NamingException e) {
                String errorMsg = "Error occurred while adding the organizational unit " +
                                  "sub context.";
                logger.error(errorMsg, e);
                throw new UserStoreException(errorMsg, e);
            }
        }

    }
View Full Code Here

                }
            }

        } catch (NamingException e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(e.getMessage(), e);
        } finally {
            //close the naming enumeration and free up resources
            JNDIUtil.closeNamingEnumeration(attrs);
            JNDIUtil.closeNamingEnumeration(answer);
            //close directory context
View Full Code Here

            if (name != null && name.length() > 0) {
                bFound = true;
            }
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(e.getMessage(), e);
        }

        return bFound;
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.user.core.UserStoreException

Copyright © 2018 www.massapicom. 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.