Package org.apache.qpid.server.configuration

Examples of org.apache.qpid.server.configuration.IllegalConfigurationException


        {
            return toMap(node);
        }
        else
        {
            throw new IllegalConfigurationException("Unexpected node: " + node);
        }
    }
View Full Code Here


        if(changedValues.containsKey(KeyStore.NAME))
        {
            String newName = (String) changedValues.get(KeyStore.NAME);
            if(!getName().equals(newName))
            {
                throw new IllegalConfigurationException("Changing the key store name is not allowed");
            }
        }

        Map<String, Object> merged = generateEffectiveAttributes(changedValues);
View Full Code Here

        {
            keyStore = SSLUtil.getInitializedKeyStore(keyStorePath, keyStorePassword, type);
        }
        catch (Exception e)
        {
            throw new IllegalConfigurationException("Cannot instantiate key store at " + keyStorePath, e);
        }

        if (alias != null)
        {
            Certificate cert = null;
            try
            {
                cert = keyStore.getCertificate(alias);
            }
            catch (KeyStoreException e)
            {
                // key store should be initialized above
                throw new RuntimeException("Key store has not been initialized", e);
            }
            if (cert == null)
            {
                throw new IllegalConfigurationException("Cannot find a certificate with alias " + alias
                        + "in key store : " + keyStorePath);
            }
        }

        try
        {
            KeyManagerFactory.getInstance(keyManagerFactoryAlgorithm);
        }
        catch (NoSuchAlgorithmException e)
        {
            throw new IllegalConfigurationException("Unknown keyManagerFactoryAlgorithm: "
                    + keyManagerFactoryAlgorithm);
        }
    }
View Full Code Here

        if (trustStoreName != null)
        {
            trustStore = broker.findTrustStoreByName(trustStoreName);
            if (trustStore == null)
            {
                throw new IllegalConfigurationException("Can't find truststore with name '" + trustStoreName + "'");
            }
        }

        return new SimpleLDAPAuthenticationManager(name, providerUrl, providerAuthUrl, searchContext,
                searchFilter, ldapContextFactory, trustStore);
View Full Code Here

            else if (transports.contains(Transport.SSL))
            {
                KeyStore keyStore = port.getKeyStore();
                if (keyStore == null)
                {
                    throw new IllegalConfigurationException("Key store is not configured. Cannot start management on HTTPS port without keystore");
                }
                SslContextFactory factory = new SslContextFactory();
                try
                {
                    SSLContext sslContext = SSLContext.getInstance("TLS");
View Full Code Here

        if(convertedAttributes.containsKey(HttpManagement.NAME))
        {
            String newName = (String) convertedAttributes.get(HttpManagement.NAME);
            if(!getName().equals(newName))
            {
                throw new IllegalConfigurationException("Changing the name of http management plugin is not allowed");
            }
        }
        if (convertedAttributes.containsKey(TIME_OUT))
        {
            Number value = (Number) convertedAttributes.get(TIME_OUT);
            if (value == null || value.longValue() < 0)
            {
                throw new IllegalConfigurationException("Only positive integer value can be specified for the session time out attribute");
            }
        }
    }
View Full Code Here

    void onConfiguredObject(final UUID id, final String type, final Map<String, Object> attributes)
    {
        DurableConfiguredObjectRecoverer recoverer = getRecoverer(type);
        if(recoverer == null)
        {
            throw new IllegalConfigurationException("Unkown type for configured object: " + type);
        }
        recoverer.load(this, id, attributes);
    }
View Full Code Here

                    _logger.error(errorMessage);
                }
            }
            if(unresolvedObjectsExist)
            {
                throw new IllegalConfigurationException("Durable configuration has unresolved dependencies");
            }
        }
    }
View Full Code Here

            String type)
    {
        ConfiguredObjectRecoverer<?> recoverer = recovererProvider.getRecoverer(type);
        if (recoverer == null)
        {
            throw new IllegalConfigurationException("Cannot recover entry for the type '" + type + "' from broker");
        }
        Collection<ConfigurationEntry> entries = childEntries.get(type);
        for (ConfigurationEntry childEntry : entries)
        {
            ConfiguredObject object = recoverer.create(recovererProvider, childEntry, authenticationProvider);
            if (object == null)
            {
                throw new IllegalConfigurationException("Cannot create configured object for the entry " + childEntry);
            }
            if (object instanceof PreferencesProvider)
            {
                authenticationProvider.setPreferencesProvider((PreferencesProvider)object);
            }
            else
            {
                throw new IllegalConfigurationException("Cannot associate  " + object + " with authentication provider " + authenticationProvider);
            }
            object.addChangeListener(storeChangeListener);
        }
    }
View Full Code Here

            modelVersion = MapValueConverter.getStringAttribute(Broker.MODEL_VERSION, attributes, null);
        }

        if (modelVersion == null)
        {
            throw new IllegalConfigurationException("Broker " + Broker.MODEL_VERSION + " must be specified");
        }

        if (!MODEL_VERSION_PATTERN.matcher(modelVersion).matches())
        {
            throw new IllegalConfigurationException("Broker " + Broker.MODEL_VERSION + " is specified in incorrect format: "
                    + modelVersion);
        }

        int versionSeparatorPosition = modelVersion.indexOf(".");
        String majorVersionPart = modelVersion.substring(0, versionSeparatorPosition);
        int majorModelVersion = Integer.parseInt(majorVersionPart);
        int minorModelVersion = Integer.parseInt(modelVersion.substring(versionSeparatorPosition + 1));

        if (majorModelVersion != Model.MODEL_MAJOR_VERSION || minorModelVersion > Model.MODEL_MINOR_VERSION)
        {
            throw new IllegalConfigurationException("The model version '" + modelVersion
                    + "' in configuration is incompatible with the broker model version '" + Model.MODEL_VERSION + "'");
        }

        if(!Model.MODEL_VERSION.equals(modelVersion))
        {
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.IllegalConfigurationException

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.