Package org.springframework.core

Examples of org.springframework.core.NestedIOException


  public URI getURI() throws IOException {
    try {
      return VfsUtils.getURI(this.resource);
    }
    catch (Exception ex) {
      throw new NestedIOException("Failed to obtain URI for " + this.resource, ex);
    }
  }
View Full Code Here


    URL url = getURL();
    try {
      return ResourceUtils.toURI(url);
    }
    catch (URISyntaxException ex) {
      throw new NestedIOException("Invalid URI [" + url + "]", ex);
    }
  }
View Full Code Here

      // Check that we can get the template, even if we might subsequently get it again.
      getTemplate(this.layoutUrl);
      return true;
    }
    catch (ResourceNotFoundException ex) {
      throw new NestedIOException("Cannot find Velocity template for URL [" + this.layoutUrl +
          "]: Did you specify the correct resource loader path?", ex);
    }
    catch (Exception ex) {
      throw new NestedIOException(
          "Could not load Velocity template for URL [" + this.layoutUrl + "]", ex);
    }
  }
View Full Code Here

        logger.debug("No Velocity view found for URL: " + getUrl());
      }
      return false;
    }
    catch (Exception ex) {
      throw new NestedIOException(
          "Could not load Velocity template for URL [" + getUrl() + "]", ex);
    }
  }
View Full Code Here

    for (int i = 0; i < configLocations.length; i++) {
      InputStream is = configLocations[i].getInputStream();
      try {
        client = configParser.parse(is, properties);
      } catch (RuntimeException ex) {
        throw new NestedIOException("Failed to parse config resource: " + configLocations[i], ex.getCause());
      }
    }

    if (mappingLocations != null) {
      SqlMapParser mapParser = SqlMapParserFactory.createSqlMapParser(configParser);
      for (int i = 0; i < mappingLocations.length; i++) {
        try {
          mapParser.parse(mappingLocations[i].getInputStream());
        } catch (NodeletException ex) {
          throw new NestedIOException("Failed to parse mapping resource: " + mappingLocations[i], ex);
        }
      }
    }

    return client;
View Full Code Here

      InputStream is = configLocation.getInputStream();
      try {
        client = configParser.parse(is, properties);
      }
      catch (RuntimeException ex) {
        throw new NestedIOException("Failed to parse config resource: " + configLocation, ex.getCause());
      }
    }

    if (mappingLocations != null) {
      SqlMapParser mapParser = SqlMapParserFactory.createSqlMapParser(configParser);
      for (Resource mappingLocation : mappingLocations) {
        try {
          mapParser.parse(mappingLocation.getInputStream());
        }
        catch (NodeletException ex) {
          throw new NestedIOException("Failed to parse mapping resource: " + mappingLocation, ex);
        }
      }
    }

    return client;
View Full Code Here

      }
      try {
        return new File((URI) invokeVfsMethod(VFS_UTILS_METHOD_GET_COMPATIBLE_URI, null, vfsResource));
      }
      catch (Exception ex) {
        throw new NestedIOException("Failed to obtain File reference for " + vfsResource, ex);
      }
    }
    else {
      return (File) invokeVfsMethod(GET_PHYSICAL_FILE, vfsResource);
    }
View Full Code Here

  public URL getURL() throws IOException {
    try {
      return VfsUtils.getURL(this.resource);
    }
    catch (Exception ex) {
      throw new NestedIOException("Failed to obtain URL for file " + this.resource, ex);
    }
  }
View Full Code Here

  public URI getURI() throws IOException {
    try {
      return VfsUtils.getURI(this.resource);
    }
    catch (Exception ex) {
      throw new NestedIOException("Failed to obtain URI for " + this.resource, ex);
    }
  }
View Full Code Here

        logger.info("SMB root directory does not exist. Creating it.");
        mkdirs();
      }
      canRead = canRead();
    } catch (SmbException _ex) {
      throw new NestedIOException("Unable to initialize share: " + this, _ex);
    }
    Assert.isTrue(canRead, "Share is not accessible " + this);
    open.set(true);
  }
View Full Code Here

TOP

Related Classes of org.springframework.core.NestedIOException

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.