Examples of ResourceException


Examples of org.g4studio.core.resource.ResourceException

      throw new NullPointerException("资源Loader名称不能为空null");
    }
    logger.debug("获取名字为:" + pName + "的资源Loader.");
    String handlerName = pName.toLowerCase();
    if (loaders.containsKey(handlerName) == false) {
      throw new ResourceException("不存在名为:" + pName + "的资源Loader");
    }
    ResourceLoader result = (ResourceLoader) loaders.get(handlerName);
    logger.debug("获取到名字为:" + pName + "的资源Loader.");
    return result;
  }
View Full Code Here

Examples of org.globus.wsrf.ResourceException

        final String callerDN = SecurityManager.getManager().getCaller();

        if (callerDN == null) {
            logger.error("REMOVE: no caller identity");
            throw new ResourceException("no caller identity", null);
        }

        final Caller caller = this.baseTranslate.getCaller(callerDN);

        try {
            this.manager.trash(this.id, this.type, caller);
        } catch (DoesNotExistException e) {
            throw new NoSuchResourceException(e.getMessage(), e);
        } catch (ManageException e) {
            if (logger.isDebugEnabled()) {
                logger.error(e.getMessage(), e);
            } else {
                logger.error(e.getMessage());
            }

            throw new ResourceException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.gradle.api.resources.ResourceException

        InputStream is = resource.read();
        try {
            return new GZIPInputStream(is);
        } catch (Exception e) {
            String message = String.format("Unable to create gzip input stream for resource %s.", resource.getDisplayName());
            throw new ResourceException(message, e);
        }
    }
View Full Code Here

Examples of org.gradle.internal.resource.ResourceException

                    resource.writeTo(destination);
                } finally {
                    resource.close();
                }
            } catch (IOException e) {
                throw new ResourceException(String.format("Failed to download resource '%s'.", resource.getName()), e);
            }
            return cacheLockingManager.useCache(String.format("Store %s", resource.getName()), new Factory<LocallyAvailableExternalResource>() {
                public LocallyAvailableExternalResource create() {
                    LocallyAvailableResource cachedResource = fileStore.moveIntoCache(destination);
                    File fileInFileStore = cachedResource.getFile();
View Full Code Here

Examples of org.jano.resources.ResourceException

    ResourceView view = mountPoints.get(Uri.ROOT);
    if (null != view) {
      return view.viewOf(Uri.ROOT, resourceUri, this);
    }

    throw new ResourceException("Resource URI '" + resourceUri + "' has no known views");
  }
View Full Code Here

Examples of org.jboss.forge.addon.resource.ResourceException

   private JavaResource getJavaResource(final DirectoryResource sourceDir, final String relativePath)
   {
      if (Strings.isNullOrEmpty(relativePath))
      {
         throw new ResourceException("Empty relative path");
      }
      String path = relativePath.trim().endsWith(".java")
               ? relativePath.substring(0, relativePath.lastIndexOf(".java")) : relativePath;

      path = Packages.toFileSyntax(path) + ".java";
View Full Code Here

Examples of org.jboss.forge.resource.ResourceException

      {
         return subset.get(0);
      }
      else if (subset.size() > 1)
      {
         throw new ResourceException("Ambiguous name [" + name + "], full type signature required");
      }
      else
      {
         return null;
      }
View Full Code Here

Examples of org.jboss.forge.resources.ResourceException

   private void assertPropertiesInContext()
   {
      if (propertiesFileResource == null)
      {
         throw new ResourceException("No bundle informed or in context");
      }

   }
View Full Code Here

Examples of org.lilyproject.rest.ResourceException

            throws IOException, WebApplicationException {

        JsonNode node = JsonFormat.deserializeNonStd(entityStream);

        if (!(node instanceof ObjectNode)) {
            throw new ResourceException("Request body should be a JSON object.", BAD_REQUEST.getStatusCode());
        }

        ObjectNode objectNode = (ObjectNode)node;

        try {
            // Multiple repositories: ok to use public repo since only non-repository-specific things are needed
            return EntityRegistry.findReader(type).fromJson(objectNode, null, repositoryMgr.getDefaultRepository(),
                    linkTransformer);
        } catch (JsonFormatException e) {
            throw new ResourceException("Error in submitted JSON.", e, BAD_REQUEST.getStatusCode());
        } catch (Exception e) {
            throw new ResourceException("Error reading submitted JSON.", e, INTERNAL_SERVER_ERROR.getStatusCode());
        }
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceException

      return resource;
    }
    catch (CloneNotSupportedException e)
    {

      throw new ResourceException("Unable to retrieve the resource.", e);
    }
  }
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.