Package org.nasutekds.server.config

Examples of org.nasutekds.server.config.ConfigException


          // These are acceptable
          break;
        default:
          Message message =
              ERR_PLUGIN_NETWORKGROUP_INVALID_PLUGIN_TYPE.get(t.toString());
          throw new ConfigException(message);
      }
    }
  }
View Full Code Here


    {
       // Handle the exception: put a message in the unacceptable reasons.
       Message message = ERR_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS.
           get(String.valueOf(className), String.valueOf(configuration.dn()),
               stackTraceToSingleLineString(e));
       throw new ConfigException(message, e);
    }
    try
    {
      // Instantiate the class.
      provider = theClass.newInstance();
    } catch (Exception e)
    {
      // Handle the exception: put a message in the unacceptable reasons.
      Message message = ERR_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER.
          get(String.valueOf(className), String.valueOf(configuration.dn()),
              stackTraceToSingleLineString(e));
      throw new ConfigException(message, e);
    }
    try
    {
      // Initialize the Synchronization Provider.
      provider.initializeSynchronizationProvider(configuration);
    } catch (Exception e)
    {
      try
      {
        provider.finalizeSynchronizationProvider();
      }
      catch(Exception ce)
      {}

      // Handle the exception: put a message in the unacceptable reasons.
      Message message = ERR_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER.get(
              String.valueOf(className), String.valueOf(configuration.dn()));
      throw new ConfigException(message, e);
    }
    return provider;
  }
View Full Code Here

      }
      else
      {
        Message message = ERR_CONFIG_LOGGER_INVALID_OBJECTCLASS.get(
            String.valueOf(config.dn()));
        throw new ConfigException(message);
      }
    }

    // See if there are active loggers in all categories.  If not, then log a
    // message.
View Full Code Here

    // dynamically loaded from the configuration.  Rather, it should be
    // explicitly created and registered by the LDAP connection handler or an
    // LDAP client connection.
    Message message = ERR_LDAP_STATS_INVALID_MONITOR_INITIALIZATION.get(
        String.valueOf(configuration.dn()));
    throw new ConfigException(message);
  }
View Full Code Here

        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }

      Message message = ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get(
          String.valueOf(dn), stackTraceToSingleLineString(e));
      throw new ConfigException(message, e);
    }

    // The configuration handler is free to return null indicating
    // that the entry does not exist.
    if (configEntry == null) {
      Message message = ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST
          .get(String.valueOf(dn));
      throw new ConfigException(message);
    }

    return configEntry;
  }
View Full Code Here

    {
      // Rethrow the exceptions thrown be the invoked method.
      Throwable e = ite.getTargetException();
      Message message = ERR_CONFIG_RETENTION_POLICY_INVALID_CLASS.get(
          className, config.dn().toString(), stackTraceToSingleLineString(e));
      throw new ConfigException(message, e);
    } catch (Exception e) {
      Message message = ERR_CONFIG_RETENTION_POLICY_INVALID_CLASS.get(
          className, config.dn().toString(), String.valueOf(e));
      throw new ConfigException(message, e);
    }

    // The connection handler has been successfully initialized.
    return RetentionPolicy;
  }
View Full Code Here

    // See if the base entry has any children.  If not, then that means that
    // there are no policies defined, so that's a problem.
    if (passwordPoliciesName.length == 0)
    {
      Message message = ERR_CONFIG_PWPOLICY_NO_POLICIES.get();
      throw new ConfigException(message);
    }


    // Get the DN of the default password policy from the core configuration.
    if( null == DirectoryServer.getDefaultPasswordPolicyDN())
    {
      Message message = ERR_CONFIG_PWPOLICY_NO_DEFAULT_POLICY.get();
      throw new ConfigException(message);
    }


    // Iterate through the child entries and process them as password policy
    // configuration entries.
    for (String passwordPolicyName : passwordPoliciesName)
    {
      PasswordPolicyCfg passwordPolicyConfiguration =
        rootConfiguration.getPasswordPolicy(passwordPolicyName);

      try
      {
        PasswordPolicy policy = new PasswordPolicy(passwordPolicyConfiguration);
        PasswordPolicyConfig config = new PasswordPolicyConfig(policy);
        DirectoryServer.registerPasswordPolicy(
            passwordPolicyConfiguration.dn(), config);
        passwordPolicyConfiguration.addChangeListener(config);
      }
      catch (ConfigException ce)
      {
        Message message = ERR_CONFIG_PWPOLICY_INVALID_POLICY_CONFIG.get(
            String.valueOf(passwordPolicyConfiguration.dn()), ce.getMessage());
        throw new ConfigException(message, ce);
      }
      catch (InitializationException ie)
      {
        Message message = ERR_CONFIG_PWPOLICY_INVALID_POLICY_CONFIG.get(
            String.valueOf(passwordPolicyConfiguration.dn()), ie.getMessage());
        throw new InitializationException(message, ie);
      }
      catch (Exception e)
      {
        Message message = ERR_CONFIG_PWPOLICY_INVALID_POLICY_CONFIG.
            get(String.valueOf(passwordPolicyConfiguration.dn()),
                stackTraceToSingleLineString(e));
        throw new InitializationException(message, e);
      }
    }


    // If the entry specified by the default password policy DN has not been
    // registered, then fail.
    if (null == DirectoryServer.getDefaultPasswordPolicy())
    {
      DN defaultPolicyDN = DirectoryServer.getDefaultPasswordPolicyDN();
      Message message = ERR_CONFIG_PWPOLICY_MISSING_DEFAULT_POLICY.get(
              String.valueOf(defaultPolicyDN));
      throw new ConfigException(message);
    }

    // Process and register any password policy subentries.
    List<SubEntry> pwpSubEntries =
            DirectoryServer.getSubentryManager().getSubentries();
View Full Code Here

        default:
          Message message =
            ERR_PLUGIN_FRACTIONAL_LDIF_IMPORT_INVALID_PLUGIN_TYPE.get(
            t.toString());
          throw new ConfigException(message);
      }
    }
  }
View Full Code Here

      if (debugEnabled()) {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      Message message = ERR_CONFIG_BACKEND_CANNOT_GET_CONFIG_BASE.get(
          getExceptionMessage(e));
      throw new ConfigException(message, e);
    }
    if (backendRoot == null) {
      Message message = ERR_CONFIG_BACKEND_BASE_DOES_NOT_EXIST.get();
      throw new ConfigException(message);
    }
    for (String name : root.listBackends()) {
      BackendCfg backendCfg = root.getBackend(name);
      String backendID = backendCfg.getBackendId();
      if(backendCfg instanceof TrustStoreBackendCfg ||
View Full Code Here

    buffer.append(")");

    Message message = ERR_CONFIG_JMX_NO_METHOD.get(
        buffer.toString(), String.valueOf(configEntryDN));
    throw new MBeanException(new ConfigException(message));
  }
View Full Code Here

TOP

Related Classes of org.nasutekds.server.config.ConfigException

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.