Examples of EmbeddingLDAPException


Examples of org.wso2.carbon.ldap.server.util.EmbeddingLDAPException

    private String getCarbonHome() throws EmbeddingLDAPException {
        String carbonHome = System.getProperty("carbon.home");
        if (carbonHome == null) {
            String msg = "carbon.home property not set. Cannot find carbon home directory.";
            logger.error(msg);
            throw new EmbeddingLDAPException(msg);
        }

        return carbonHome;
    }
View Full Code Here

Examples of org.wso2.carbon.ldap.server.util.EmbeddingLDAPException

            File dataDir = new File(getCarbonHome(), "repository/data");
            if (!dataDir.exists()) {
                if (!dataDir.mkdir()) {
                    String msg = "Unable to create data directory at " + dataDir.getAbsolutePath();
                    logger.error(msg);
                    throw new EmbeddingLDAPException(msg);
                }
            }

            File bundleDataDir = new File(dataDir, "org.wso2.carbon.directory");
            if (!bundleDataDir.exists()) {
                if (!bundleDataDir.mkdirs()) {
                    String msg = "Unable to create schema data directory at " + bundleDataDir.
                            getAbsolutePath();
                    logger.error(msg);
                    throw new EmbeddingLDAPException(msg);

                }
            }

            ldapConfiguration.setWorkingDirectory(bundleDataDir.getAbsolutePath());
View Full Code Here

Examples of org.wso2.carbon.ldap.server.util.EmbeddingLDAPException

            tenantAdminInfo.addObjectClass(
                    ldapConfigurationBuilder.getLdapConfiguration().getAdminEntryObjectClass());
        } catch (EmbeddingLDAPException e) {
            String errorMessage = "Error in obtaining LDAP Configuration.";
            logger.error(errorMessage, e);
            throw new EmbeddingLDAPException(errorMessage, e);
        }
        /*Following details of tenant admin is captured from the user through ui.*/
        //set admin's user name
        if (tenant.getAdminName() != null) {
            tenantAdminInfo.setAdminUID(tenant.getAdminName());
View Full Code Here

Examples of org.wso2.carbon.ldap.server.util.EmbeddingLDAPException

        try {
            builder = new StAXOMBuilder(configurationFileStream);
        } catch (XMLStreamException e) {
            logger.error("Unable to build LDAP configurations.", e);
            throw new EmbeddingLDAPException("Unable to build LDAP configurations", e);
        }
        /*Read the whole config file as an OMElement*/
        OMElement documentElement = builder.getDocumentElement();

        /*Extract the part that contains embedded-ldap specific configurations*/
 
View Full Code Here

Examples of org.wso2.carbon.ldap.server.util.EmbeddingLDAPException

    private void buildConnectionPassword(Map<String, String> propertyMap)
            throws EmbeddingLDAPException {

        connectionPassword = propertyMap.get("connectionPassword");
        if (connectionPassword == null) {
            throw new EmbeddingLDAPException("Connection password not specified in the " +
                                             "configuration file.");
        }

    }
View Full Code Here

Examples of org.wso2.carbon.ldap.server.util.EmbeddingLDAPException

        try {
            this.kdcConfigurations.setKdcCommunicationProtocol(propertyMap.get("protocol"));
        } catch (DirectoryServerException e) {
            String errorMessage = "Can not read/set protocol parameter in KDCConfig.";
            logger.error(errorMessage, e);
            throw new EmbeddingLDAPException(errorMessage, e);
        }
        this.kdcConfigurations.setKdcHostAddress(propertyMap.get("host"));

        //Read KDC port from carbon.xml and set it
        int port = getPort(propertyMap.get("port"));
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.