Examples of InternalErrorException


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

           ((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

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

  }
 
  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

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

        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

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

        } 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

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

    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

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

    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

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

    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

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

        // To make things simple, only allow one local mounted storage root TODO - Change in the future
        String localStorageRoot = ServiceProvider.getInstance().getStartupProperties().getProperty("storage.root");
        if(localStorageRoot != null) {
            SHostVO localSHost = shostDao.getLocalStorageHost(mhost.getId(), localStorageRoot);
            if(localSHost == null)
                throw new InternalErrorException("storage.root is configured but not initialized");

            S3BucketAdapter bucketAdapter =  getStorageHostBucketAdapter(localSHost);
            bucketAdapter.createContainer(localSHost.getExportRoot(),(null != overrideName ? overrideName : bucketName));
            return new OrderedPair<SHostVO, String>(localSHost, localStorageRoot);
        }
View Full Code Here

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

    public S3BucketAdapter getStorageHostBucketAdapter(SHostVO shost)
    {
        S3BucketAdapter adapter = bucketAdapters.get(shost.getHostType());
        if(adapter == null)
            throw new InternalErrorException("Bucket adapter is not installed for host type: " + shost.getHostType());

        return adapter;
    }
View Full Code Here

Examples of com.cloud.exception.InternalErrorException

        command.add("-p", pif);
        command.add("-o", "add");

        final String result = command.execute();
        if (result != null) {
            throw new InternalErrorException("Failed to create vnet " + vnetId
                    + ": " + result);
        }
    }
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.