Package org.dtk.resources.exceptions

Examples of org.dtk.resources.exceptions.ConfigurationException


       
        // Construct HTTP 201 response, containing text body.
        created = Response.created(new URI(packageLocation)).entity(htmlEncodedJsonPackageDetails).build();
      } catch (FileNotFoundException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLogMsg, e.getMessage()));
        throw new ConfigurationException(fatalProcessingErrorMsg);
      } catch (IOException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLogMsg, e.getMessage()));
        throw new IncorrectParameterException(invalidRequestErrorMsg);
      } catch (URISyntaxException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLocationLogMsg, e.getMessage()));
        throw new ConfigurationException(fatalProcessingErrorMsg);
      }
    } else {
      throw new IncorrectParameterException(missingAppParameterErrorMsg);
    }
View Full Code Here


      throw new IncorrectParameterException(layersParsingErrorText);
    } catch (IOException e) {
      logFatalBuildRequest(buildDetails, e);
      throw new IncorrectParameterException(layersParsingErrorText);
    } catch (NoSuchAlgorithmException e) {
      throw new ConfigurationException(missingAlgorithmErrorText);
    }
   
    return buildRequest;
  }
View Full Code Here

      }
     
      encodedJson = JsonUtil.writeJavaToHtmlEncodedJson(response);
    } catch (FatalAnalysisError e) {
      logger.log(Level.SEVERE, String.format(errorGeneratingJsonLogMsg, inputType.name(), inputValue));         
      throw new ConfigurationException(internalServerErrorText);
    } catch (JsonParseException e) {
      logger.log(Level.SEVERE, String.format(errorGeneratingJsonLogMsg, inputType.name(), inputValue));         
      throw new ConfigurationException(internalServerErrorText);
    } catch (JsonMappingException e) {
      logger.log(Level.SEVERE, String.format(errorGeneratingJsonLogMsg, inputType.name(), inputValue));         
      throw new ConfigurationException(internalServerErrorText);
    } catch (IOException e) {
      logger.log(Level.SEVERE, String.format(errorGeneratingJsonLogMsg, inputType.name(), inputValue));         
      throw new ConfigurationException(internalServerErrorText);     
    } catch (UnknownModuleIdentifier e) {
      logger.log(Level.SEVERE, String.format(errorGeneratingJsonLogMsg, inputType.name(), inputValue));         
      throw new ConfigurationException(internalServerErrorText);   
    } catch (ModuleSourceNotAvailable e) {
      logger.log(Level.SEVERE, String.format(errorGeneratingJsonLogMsg, inputType.name(), inputValue));         
      throw new ConfigurationException(internalServerErrorText);   
    }

    logger.exiting(this.getClass().getName(), "analyseDependencies");
   
    // Encoded response and return
View Full Code Here

      String packageLocation = (String) packageMetaData.get("location");
      packageMetaData.put("location", FileUtil.resolveEnvironmentVariables(packageLocation));
    } catch (IOException e) {
      String errorMessage = String.format(invalidMetaDataErrorMsg, packageName, packageVersion);
      logger.log(Level.SEVERE, errorMessage);
      throw new ConfigurationException(errorMessage);
    }
   
    return packageMetaData;
  }
View Full Code Here

    // Read and parse build option configuration from package repository.
    try {
      buildParameters = JsonUtil.genericJSONMapper(new File(buildParametersLocation));
    } catch (JsonMappingException e) {     
      logger.log(Level.SEVERE, jsonMappingErrorMsg);
      throw new ConfigurationException(jsonMappingErrorMsg);
    } catch (JsonParseException e) {
      logger.log(Level.SEVERE, jsonParsingErrorMsg);
      throw new ConfigurationException(jsonParsingErrorMsg);
    } catch (IOException e) {     
      String errorMsg = String.format(buildConfigNotFoundErrorMsg, buildParametersLocation);
      logger.log(Level.SEVERE, errorMsg);
      throw new ConfigurationException(errorMsg);
    }
   
    // Instantiate generic build options from the base level configuration file.
    return buildParameters;
  }
View Full Code Here

    // Find all sub-directories under the root parameter path.
    File[] packageDirectories = FileUtil.findAllDirectories(basePath);
    if (packageDirectories == null) {     
      String errorMsg = String.format(packagesDirectoryEmptyErrorMsg, basePath.getAbsolutePath());
      logger.log(Level.SEVERE, errorMsg);
      throw new ConfigurationException(errorMsg);
    }

    // Loop through all directories found, adding name to global list.
    for (File packageDirectory: packageDirectories) {
      packages.add(packageDirectory.getName());
View Full Code Here

TOP

Related Classes of org.dtk.resources.exceptions.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.