Package com.google.apphosting.utils.config

Examples of com.google.apphosting.utils.config.AppEngineConfigException


    if (!currentModuleName.equals(updatedModuleName)) {
      String message = String.format(
          "Unsupported configuration change of module name from '%s' to '%s' in '%s'",
          currentModuleName, updatedModuleName, currentModule.getAppEngineWebXmlFile());
      LOGGER.severe(message);
      throw new AppEngineConfigException(message);
    }
  }
View Full Code Here


    if (!currentScalingType.equals(updatedScalingType)) {
      String message = String.format(
          "Unsupported configuration change of scaling from '%s' to '%s' in '%s'",
          currentScalingType, updatedScalingType, currentModule.getAppEngineWebXmlFile());
      LOGGER.severe(message);
      throw new AppEngineConfigException(message);
    }
  }
View Full Code Here

        String template = "Unsupported configuration change of manual scaling instances from '%s' "
            + "to '%s' in '%s'";
        String message = String.format(template, currentManualInstances, updatedManualInstances,
            currentModule.getAppEngineWebXmlFile());
        LOGGER.severe(message);
        throw new AppEngineConfigException(message);
      }
      break;

      case BASIC:
      String currentBasicMaxInstances =
View Full Code Here

      synchronized (ApplicationConfigurationManager.this) {
        if (EarHelper.isEar(configurationRoot.getAbsolutePath())) {
          String message = String.format("Unsupported update from WAR to EAR for: %s",
              configurationRoot.getAbsolutePath());
          LOGGER.severe(message);
          throw new AppEngineConfigException(message);
        }
        WebModule updatedWebModule = EarHelper.readWebModule(null, configurationRoot,
            rawAppEngineWebXmlLocation, rawWebXmlLocation, appIdPrefix);
        if (webModule != null) {
          checkDynamicModuleUpdateAllowed(webModule, updatedWebModule);
View Full Code Here

      if (!currentWarDirectories.equals(updatedWarDirectories)) {
        String message = String.format(
            "Unsupported configuration change of war directories from '%s' to '%s'",
            currentWarDirectories, updatedWarDirectories);
        LOGGER.severe(message);
        throw new AppEngineConfigException(message);
      }
    }
View Full Code Here

        String template = "Property %s is defined in %s and in %s with different values. "
            + "Currently Java Development Server requires matching values.";
        String message = String.format(template, entry.getKey(),
            appengineWebXmlFile.getAbsolutePath(), propertyNameToFileMap.get(entry.getKey()));
        LOGGER.severe(message);
        throw new AppEngineConfigException(message);
      }
      if (originalSystemProperties.containsKey(entry.getKey())) {
        String message = String.format(
            "Overwriting system property key '%s', value '%s' with value '%s' from '%s'",
            entry.getKey(), originalSystemProperties.get(entry.getKey()),
View Full Code Here

  private File determineAppRoot() throws IOException {
    Resource webInf = context.getWebInf();
    if (webInf == null) {
      if (userCodeClasspathManager.requiresWebInf()) {
        throw new AppEngineConfigException(
            "Supplied application has to contain WEB-INF directory.");
      }
      return appDir;
    }
    return webInf.getFile().getParentFile();
View Full Code Here

  private static List<ManualInstanceHolder> makeInstanceHolders(
      ModuleConfigurationHandle moduleConfigurationHandle, AppEngineWebXml appEngineWebXml) {
    String instancesString = appEngineWebXml.getManualScaling().getInstances();
    int instances = instancesString == null ? 0 : Integer.parseInt(instancesString);
    if (instances < 0) {
      throw new AppEngineConfigException("Invalid instances " + instances + " in file "
        + moduleConfigurationHandle.getModule().getAppEngineWebXmlFile());
    }

    ImmutableList.Builder<ManualInstanceHolder> listBuilder = ImmutableList.builder();
    for (int ix = LocalEnvironment.MAIN_INSTANCE; ix < instances; ix++) {
View Full Code Here

  private static List<ManualInstanceHolder> toInstanceHolders(
      AppEngineWebXml appEngineWebXml, ModuleConfigurationHandle moduleConfigurationHandle) {
    String instancesString = appEngineWebXml.getBasicScaling().getMaxInstances();
    int instances = instancesString == null ? 0 : Integer.parseInt(instancesString);
    if (instances <= 0) {
      throw new AppEngineConfigException("Invalid instances " + instances + " in file "
        + moduleConfigurationHandle.getModule().getAppEngineWebXmlFile());
    }
    ImmutableList.Builder<ManualInstanceHolder> listBuilder = ImmutableList.builder();
    for (
        int index = LocalEnvironment.MAIN_INSTANCE;
View Full Code Here

TOP

Related Classes of com.google.apphosting.utils.config.AppEngineConfigException

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.