Examples of ConfigurationException


Examples of org.elasticsearch.common.inject.ConfigurationException

     * @throws ConfigurationException if {@code type} contains a type variable
     */
    public static <T> TypeLiteral<T> makeKeySafe(TypeLiteral<T> type) {
        if (!isFullySpecified(type.getType())) {
            String message = type + " cannot be used as a key; It is not fully specified.";
            throw new ConfigurationException(ImmutableSet.of(new Message(message)));
        }

        @SuppressWarnings("unchecked")
        TypeLiteral<T> wrappedPrimitives = (TypeLiteral<T>) PRIMITIVE_TO_WRAPPER.get(type);
        return wrappedPrimitives != null
View Full Code Here

Examples of org.exist.config.ConfigurationException

    int id = -1;
    XmldbURI home = null;
   
    final String name = node.getAttribute(NAME);
    if (name == null ) //|| name.length() == 0
      {throw new ConfigurationException("account needs a name");}
   
    Attr attr;
    if (majorVersion == 0) {
      attr = node.getAttributeNode(PASS);
      digestPassword = attr == null ? null : attr.getValue();
    } else {
      attr = node.getAttributeNode(PASS);
      password = attr == null ? null : attr.getValue();

      attr = node.getAttributeNode(DIGEST_PASS);
      digestPassword = attr == null ? null : attr.getValue();
    }
    final Attr userId = node.getAttributeNode(USER_ID);
    if (userId == null)
      {throw new ConfigurationException("attribute id is missing");}
    try {
      id = Integer.parseInt(userId.getValue());
    } catch (final NumberFormatException e) {
      throw new ConfigurationException("illegal user id: " + userId + " for account " + name);
    }
    final Attr homeAttr = node.getAttributeNode(HOME);
    home = homeAttr == null ? null : XmldbURI.create(homeAttr.getValue());
   
    //TODO: workaround for 'null' admin's password. It should be removed after 6 months (@ 10 July 2010)
View Full Code Here

Examples of org.exoplatform.container.configuration.ConfigurationException

   {

      ValueParam bnParam = params.getValueParam("bind-name");
      if (bnParam == null)
      {
         throw new ConfigurationException("No 'bind-name' parameter found");
      }
      ValueParam cnParam = params.getValueParam("class-name");
      if (cnParam == null)
      {
         throw new ConfigurationException("No 'class-name' parameter found");
      }
      ValueParam factoryParam = params.getValueParam("factory");
      if (factoryParam == null)
      {
         throw new ConfigurationException("No 'factory' parameter found");
      }
      ValueParam flParam = params.getValueParam("factory-location");
      String factoryLocation;
      if (flParam != null)
         factoryLocation = flParam.getValue();
View Full Code Here

Examples of org.foray.common.ConfigurationException

            this.inputmode = CommandLineOptions.INPUT_FO;
            final String foValue = this.parsedCommandLine.getOptionValue("fo");
            try {
                this.foInput = URLFactory.createURL(foValue);
            } catch (final MalformedURLException e) {
                throw new ConfigurationException("Command-line error: Malformed URL for -fo: " + foValue, e);
            }
            this.sessionConfig.setBaseDocument(this.foInput);
        } else {
            this.inputmode = CommandLineOptions.INPUT_XSLT;
            final String xmlValue = this.parsedCommandLine.getOptionValue("xml");
            try {
                this.xmlInput = URLFactory.createURL(xmlValue);
            } catch (final MalformedURLException e) {
                throw new ConfigurationException("Command-line error: Malformed URL for -xml: " + xmlValue, e);
            }
            this.sessionConfig.setBaseDocument(this.xmlInput);
            final String xslValue = this.parsedCommandLine.getOptionValue("xsl");
            try {
                this.xsltInput = URLFactory.createURL(xslValue);
            } catch (final MalformedURLException e) {
                throw new ConfigurationException("Command-line error: Malformed URL for -xsl: " + xslValue, e);
            }
        }
    }
View Full Code Here

Examples of org.geowebcache.config.ConfigurationException

        } finally {
            configOut.close();
        }
        configFile.delete();
        if (!tmpConfigFile.renameTo(configFile)) {
            throw new ConfigurationException("Couldn't save disk quota config file "
                    + configFile.getAbsolutePath());
        }
    }
View Full Code Here

Examples of org.graylog2.ConfigurationException

                              ConditionType conditionType,
                              String conditionValue) throws ReservedFieldException, ConfigurationException {
        super(metricRegistry, id, title, order, Type.SUBSTRING, cursorStrategy, sourceField, targetField, extractorConfig, creatorUserId, converters, conditionType, conditionValue);

        if (extractorConfig == null || extractorConfig.get("begin_index") == null || extractorConfig.get("end_index") == null) {
            throw new ConfigurationException("Missing configuration fields. Required: begin_index, end_index");
        }

        try {
            beginIndex = (Integer) extractorConfig.get("begin_index");
            endIndex = (Integer) extractorConfig.get("end_index");
        } catch (ClassCastException e) {
            throw new ConfigurationException("Index positions cannot be casted to Integer.");
        }
    }
View Full Code Here

Examples of org.graylog2.plugin.configuration.ConfigurationException

    @Override
    public void checkConfiguration() throws ConfigurationException {
        if (configuration.getString("sender") == null || configuration.getString("sender").isEmpty()
                || configuration.getString("subject") == null || configuration.getString("subject").isEmpty())
            throw new ConfigurationException("Sender or subject are missing or invalid!");
    }
View Full Code Here

Examples of org.hibernate.internal.util.config.ConfigurationException

      Properties properties = new Properties();
      properties.load( stream );
      settings.putAll( properties );
    }
    catch (IOException e) {
      throw new ConfigurationException( "Unable to apply settings from properties file [" + resourceName + "]", e );
    }
    finally {
      try {
        stream.close();
      }
View Full Code Here

Examples of org.impalaframework.exception.ConfigurationException

            StringPropertyValue allLocations = new StringPropertyValue(propertySource, CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE, CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE_DEFAULT);
            configSettings.addProperty(CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE, allLocations);
        } else if ("hierarchical".equalsIgnoreCase(value)) {
            //nothing to do here
        } else {
            throw new ConfigurationException("Invalid value for property 'classloader.type': " + value);
        }
    }
View Full Code Here

Examples of org.infinispan.config.ConfigurationException

            }
         }
         ParseUtils.requireNoContent(reader);
      }
      if (count > 1)
         throw new ConfigurationException("Only one 'takeOffline' element allowed within a 'backup'");
   }
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.