Package com.cloud.bridge.service.exception

Examples of com.cloud.bridge.service.exception.InternalErrorException


        try {
            md5 = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
            s_logger.error("Unexpected exception " + e.getMessage(), e);
            throw new InternalErrorException("Unable to get MD5 MessageDigest", e);
        }

        File spoolFile = null;
        try {
            spoolFile = File.createTempFile("castor", null);
        } catch (IOException e) {
            s_logger.error("Unexpected exception creating temporary CAStor spool file: " + e.getMessage(), e);
            throw new InternalErrorException("Unable to create temporary CAStor spool file", e);
        }
        try {
            String retVal;
            int streamLen = 0;
            try {
View Full Code Here


   
    try {
      md5 = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException e) {
      logger.error("Unexpected exception " + e.getMessage(), e);
      throw new InternalErrorException("Unable to get MD5 MessageDigest", e);
    }
   
    File file = new File(getBucketFolderDir(mountedRoot, bucket) + File.separatorChar + fileName);
    try {
      // -> when versioning is off we need to rewrite the file contents
View Full Code Here

   
    try {
      md5 = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException e) {
      logger.error("Unexpected exception " + e.getMessage(), e);
      throw new InternalErrorException("Unable to get MD5 MessageDigest", e);
    }
   
    File file = new File(getBucketFolderDir(mountedRoot, destBucket) + File.separatorChar + fileName);
    try {
      // -> when versioning is off we need to rewrite the file contents
View Full Code Here

           ((Group)grantee).setURI( "http://acs.amazonaws.com/groups/global/Authenticated" );
           grants[i].setGrantee(grantee);
           break;
         
        default :
          throw new InternalErrorException("Unsupported grantee type");
        }
       
       
        switch( engineGrants[i].getPermission()) {
        case SAcl.PERMISSION_READ:      grants[i].setPermission(Permission.READ);   break;
View Full Code Here

  }
 
  public JsonElement eval(String propPath) {
    JsonElement jsonElement = tryEval(propPath);
    if(jsonElement == null)
      throw new InternalErrorException("Property " + propPath + " is resolved to null JSON element on object: " + _json.toString());

    return jsonElement;
  }
View Full Code Here

        return ((JsonObject)jsonElementToResolveAt).get(_propName);

      if(jsonElementToResolveAt.isJsonNull())
        throw new NullPointerException(String.format("Property %s points to a null element on object: %s", _propName, jsonElementToResolveAt.toString()));
     
      throw new InternalErrorException("Unable to evaluate JSON accessor property: " + _propName
        + ", on object: " + jsonElementToResolveAt.toString());
    }
View Full Code Here

        } else {
          if(jsonElementToResolveAt.isJsonNull())
            throw new NullPointerException(String.format("Property %s points to a null element on object: %s", _propName, jsonElementToResolveAt.toString()));
         
         
          throw new InternalErrorException("Unable to evaluate JSON accessor property: " + _propName
              + ", on object: " + jsonElementToResolveAt.toString());
        }
      }
     
      if(jsonElementToResolveAt instanceof JsonArray) {
        return ((JsonArray)jsonElementToResolveAt).get(_index);
      }

      if(jsonElementToResolveAt.isJsonNull())
        throw new NullPointerException(String.format("Property %s points to a null element on object: %s", _propName, jsonElementToResolveAt.toString()));
     
      throw new InternalErrorException("Unable to evaluate JSON accessor property: " + _propName
          + ", on object: " + jsonElementToResolveAt.toString());
    }
View Full Code Here

    if (annonymous)
      return StringHelper.EMPTY_STRING;
   
    if (accessKey == null) {
      logger.error("Fatal - UserContext has not been correctly setup");
      throw new InternalErrorException("Uninitalized user context");
    }
    return accessKey;
  }
View Full Code Here

    if (annonymous)
      return StringHelper.EMPTY_STRING;
   
    if (secretKey == null) {
      logger.error("Fatal - UserContext has not been correctly setup");
      throw new InternalErrorException("Uninitalized user context");
    }
   
    return secretKey;
  }
View Full Code Here

    if (annonymous)
      return StringHelper.EMPTY_STRING;
   
    if (canonicalUserId == null) {
      logger.error("Fatal - UserContext has not been correctly setup");
      throw new InternalErrorException("Uninitalized user context");
    }
   
    return canonicalUserId;
  }
View Full Code Here

TOP

Related Classes of com.cloud.bridge.service.exception.InternalErrorException

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.