Package javax.naming

Examples of javax.naming.ConfigurationException


            s_logger.warn("Remote Access VPN global configuration missing client ip range -- ignoring");
            return;
        }
        Integer pskLength = _pskLength;
        if (pskLength != null && (pskLength < 8 || pskLength > 256)) {
            throw new ConfigurationException("Remote Access VPN: IPSec preshared key length should be between 8 and 256");
        } else if (pskLength == null) {
            s_logger.warn("Remote Access VPN configuration missing Preshared Key Length -- ignoring");
            return;
        }

        String[] range = ipRange.split("-");
        if (range.length != 2) {
            throw new ConfigurationException("Remote Access VPN: Invalid ip range " + ipRange);
        }
        if (!NetUtils.isValidIp(range[0]) || !NetUtils.isValidIp(range[1])) {
            throw new ConfigurationException("Remote Access VPN: Invalid ip in range specification " + ipRange);
        }
        if (!NetUtils.validIpRange(range[0], range[1])) {
            throw new ConfigurationException("Remote Access VPN: Invalid ip range " + ipRange);
        }
    }
View Full Code Here


                csf = (RMIClientSocketFactory) Class.forName(
                        clientSocketFactoryName, true, Thread.currentThread()
                                .getContextClassLoader()).newInstance();
            } catch (ClassNotFoundException e) {
                // jndi.79=RMI Client Socket Factory cannot be instantiated
                throw (ConfigurationException) new ConfigurationException(
                        Messages.getString("jndi.79")) //$NON-NLS-1$
                                .initCause(e);
            } catch (InstantiationException e) {
                // jndi.79=RMI Client Socket Factory cannot be instantiated
                throw (ConfigurationException) new ConfigurationException(
                        Messages.getString("jndi.79")) //$NON-NLS-1$
                                .initCause(e);
            } catch (IllegalAccessException e) {
                // jndi.79=RMI Client Socket Factory cannot be instantiated
                throw (NoPermissionException) new NoPermissionException(
View Full Code Here

     */
    public Reference getReference() throws NamingException {
        if (reference == null) {
            if ((host == null) || (host.equals("localhost"))) { //$NON-NLS-1$
                // jndi.81=Cannot create reference for RMI registry that is being accessed using localhost
                throw new ConfigurationException(
                        Messages.getString("jndi.81")); //$NON-NLS-1$
            }
            reference = new Reference(
                    RegistryContext.class.getName(),
                    new StringRefAddr(ADDRESS_TYPE, RMI_URL_PREFIX + "//" //$NON-NLS-1$
View Full Code Here

               || (e instanceof NoSuchObjectException)
               || (e instanceof java.rmi.server.SkeletonMismatchException)
               || (e instanceof java.rmi.server.SkeletonNotFoundException)
               || (e instanceof StubNotFoundException)
               || (e instanceof UnknownHostException)
                        ? new ConfigurationException()
                : (e instanceof ServerException)
                        ? newNamingException(e.getCause())
                        : new NamingException();

        if (ret.getCause() == null) {
View Full Code Here

                    lookupAttrClass = ProviderMgr.getRecordClassNumber(
                            recClassName);
                    if (lookupAttrClass == -1) {
                        // jndi.46=DNS class {0} is not supported
                        throw new ConfigurationException(Messages.getString("jndi.46", recClassName));//$NON-NLS-1$
                    }
                    recTypeName = lookupAttr.substring(k).trim();
                }
                else {
                    lookupAttrClass =
                            ProviderConstants.DEFAULT_LOOKUP_ATTR_CLASS;
                    recTypeName = lookupAttr.trim();
                }
                lookupAttrType = ProviderMgr.getRecordTypeNumber(recTypeName);
                if (lookupAttrType == -1) {
                    // jndi.47=DNS type {0} is not supported
                    throw new ConfigurationException(
                            Messages.getString("jndi.47", recTypeName)); //$NON-NLS-1$
                }
            }
        }
    }
View Full Code Here

                            DNSName name2 = (DNSName)
                                    nameParser.parse(dnsURL.getDomain());

                            if (name2.compareTo(contextName) != 0) {
                                // jndi.48=conflicting domains: {0} and {1}
                                throw new ConfigurationException(
                                        Messages.getString("jndi.48", contextName, name2)); //$NON-NLS-1$
                            }
                        }
                    } catch (IllegalArgumentException e) {
                        // jndi.49=Unable to parse DNS URL {0}. {1}
                        throw new ConfigurationException(
                                Messages.getString("jndi.49", token, e.getMessage())); //$NON-NLS-1$
                    }
                }
            }
        } else {
View Full Code Here

    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        try {
            _name = (String) params.get("name");
            if (_name == null) {
                throw new ConfigurationException("Unable to find name in the configuration parameters");
            }

            _zoneId = (String) params.get("zoneId");
            if (_zoneId == null) {
                throw new ConfigurationException("Unable to find zone Id  in the configuration parameters");
            }

            _physicalNetworkId = (String) params.get("physicalNetworkId");
            if (_physicalNetworkId == null) {
                throw new ConfigurationException("Unable to find physical network id in the configuration parameters");
            }

            _ip = (String) params.get("ip");
            if (_ip == null) {
                throw new ConfigurationException("Unable to find IP address in the configuration parameters");
            }

            _username = (String) params.get("username");
            if (_username == null) {
                throw new ConfigurationException("Unable to find username in the configuration parameters");
            }

            _password = (String) params.get("password");
            if (_password == null) {
                throw new ConfigurationException("Unable to find password in the configuration parameters");
            }

            _publicInterface = (String) params.get("publicinterface");
            if (_publicInterface == null) {
                throw new ConfigurationException("Unable to find public interface in the configuration parameters");
            }

            _privateInterface = (String) params.get("privateinterface");
            if (_privateInterface == null) {
                throw new ConfigurationException("Unable to find private interface in the configuration parameters");
            }

            _numRetries = NumbersUtil.parseInt((String) params.get("numretries"), 2);

            _guid = (String)params.get("guid");
            if (_guid == null) {
                throw new ConfigurationException("Unable to find the guid in the configuration parameters");
            }

            _deviceName = (String) params.get("deviceName");
            if (_deviceName == null) {
                throw new ConfigurationException("Unable to find the device name in the configuration parameters");
            }

            _isSdx = _deviceName.equalsIgnoreCase("NetscalerSDXLoadBalancer");

            _inline = Boolean.parseBoolean((String) params.get("inline"));

            if (((String) params.get("cloudmanaged")) != null) {
                _cloudManaged = Boolean.parseBoolean((String) params.get("cloudmanaged"));
            }

            // validate device configuration parameters
            login();
            validateDeviceType(_deviceName);
            validateInterfaces(_publicInterface, _privateInterface);

            //enable load balancing feature
            enableLoadBalancingFeature();
            SSL.enableSslFeature(_netscalerService, _isSdx);

            //if the the device is cloud stack provisioned then make it part of the public network
            if (_cloudManaged) {
                _publicIP = (String) params.get("publicip");
                _publicIPGateway = (String) params.get("publicipgateway");
                _publicIPNetmask = (String) params.get("publicipnetmask");
                _publicIPVlan = (String) params.get("publicipvlan");
                if ("untagged".equalsIgnoreCase(_publicIPVlan)) {
                    // if public network is un-tagged just add subnet IP
                    addSubnetIP(_publicIP, _publicIPNetmask);
                } else {
                    // if public network is tagged then add vlan and bind subnet IP to the vlan
                    addGuestVlanAndSubnet(Long.parseLong(_publicIPVlan), _publicIP, _publicIPNetmask, false);
                }
            }

            return true;
        } catch (Exception e) {
            throw new ConfigurationException(e.getMessage());
        }
    }
View Full Code Here

        // this can sometimes happen, if DB is manually or programmatically manipulated
        if(_offering == null) {
            String msg = "Data integrity problem : System Offering For Software router VM has been removed?";
            s_logger.error(msg);
            throw new ConfigurationException(msg);
        }

        _systemAcct = _accountMgr.getSystemAccount();

        String aggregationRange = configs.get("usage.stats.job.aggregation.range");
View Full Code Here

        String value = (String) params.get("scripts.timeout");
        _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000;

        _modifyVlanPath = Script.findScript(networkScriptsDir, "modifyvlan.sh");
        if (_modifyVlanPath == null) {
            throw new ConfigurationException("Unable to find modifyvlan.sh");
        }
        _modifyVxlanPath = Script.findScript(networkScriptsDir, "modifyvxlan.sh");
        if (_modifyVxlanPath == null) {
            throw new ConfigurationException("Unable to find modifyvxlan.sh");
        }
       
        try {
            createControlNetwork();
        } catch (LibvirtException e) {
            throw new ConfigurationException(e.getMessage());
        }
    }
View Full Code Here

    @Override
    public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
        _systemAccount = _accountDao.findById(AccountVO.ACCOUNT_ID_SYSTEM);
        if (_systemAccount == null) {
            throw new ConfigurationException("Unable to find the system account using " + Account.ACCOUNT_ID_SYSTEM);
        }

        _systemUser = _userDao.findById(UserVO.UID_SYSTEM);
        if (_systemUser == null) {
            throw new ConfigurationException("Unable to find the system user using " + User.UID_SYSTEM);
        }

        Map<String, String> configs = _configDao.getConfiguration(params);

        String loginAttempts = configs.get(Config.IncorrectLoginAttemptsAllowed.key());
View Full Code Here

TOP

Related Classes of javax.naming.ConfigurationException

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.