Package org.openxri.exceptions

Examples of org.openxri.exceptions.ServerInternalException


    try {

      utf8Namespace = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(namespace));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in namespace: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority namespaceAuthority;
    setParentQueryName(utf8Namespace);

    try {

      namespaceAuthority = this.store.localLookup(authorityPath);
    } catch (StoreException ex) {

      ServerException ex2 = new ServerInternalException("Error while finding namespace authority " + namespace + ".", ex);
      log.warn("", ex2);
      throw ex2;
    }

    if (namespaceAuthority == null) {
View Full Code Here


    try {

      utf8Namespace = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(namespace));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in namespace: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority parentAuthority;
    setParentQueryName(utf8Namespace);

    try {

      parentAuthority = this.store.localLookup(authorityPath);

      if (parentAuthority == null) throw new ServerNotFoundException("Namespace authority " + namespace + " not found.");
    } catch (StoreException ex) {

      ServerException ex2 = new ServerInternalException("Error while finding namespace authority " + namespace + ": " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    // the big goal is to make an XRDS, consisting of one or more XRDs

    XRDS xrds = new XRDS();
    boolean ret;

    // give subclasses a chance to init the XRDS before we begin

    ret = this.initXRDS(
        xrds,
        query,
        signed);

    // if a subclass returned true, it doesn't want us to do any more work

    if (ret == true) {

      log.debug("Subclass handled XRDS completely. Returning it without any more work.");
      return(xrds);
    }

    // generate XRDs for all subsegments in the request

    String utf8Query;

    try {

      utf8Query = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(query));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in query: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRISegment segment = new XRISegment(utf8Query);
View Full Code Here

        StoreMountable storeMountable = (StoreMountable) this.store;

        authorities = storeMountable.listAuthoritiesByPath(path);
      } catch (StoreException ex) {

        ServerException ex2 = new ServerInternalException("Error while listing mounted authorities.", ex);
        log.warn("", ex2);
        throw ex2;
      }
    }
View Full Code Here

    // bail early if trusted res is requested and we are not configured for it

    if (bSigned && (this.getPrivateKey() == null)) {

      ServerInternalException ex = new ServerInternalException("Server not configured for trusted resolution");
      log.warn(ex);
      throw(ex);
    }
   
    return(super.initXRDS(xrds, query, bSigned));
View Full Code Here

    // bail early if trusted res is requested and we are not configured for it

    if (bSigned && ((this.getCertificateChain() == null) || (this.getPrivateKey() == null))) {

      ServerInternalException ex = new ServerInternalException("Server not configured for trusted resolution");
      log.warn(ex);
      throw(ex);
    }

    return(super.initXRDS(xrds, query, bSigned));
View Full Code Here

    // bail early if trusted res is requested and we are not configured for it

    if (signed && ((this.getCertificateChain() == null) || (this.getPrivateKey() == null))) {

      ServerInternalException ex = new ServerInternalException("Server not configured for trusted resolution");
      log.warn(ex);
      throw(ex);
    }
    return(super.initXRD(xrd,parentAuthority,subSegmentName,signed));
  }
View Full Code Here

          this.cachedSamlCertChain[i] = (X509Certificate) certIter.next();
        }
      } catch (Exception e) {

        throw new ServerInternalException(
            "XRI Server Setup Error: Failed to read certificate chain: ", e);
      } finally {

        if (certStream != null) {
View Full Code Here

        KeyFactory keyFactory = KeyFactory.getInstance("RSA");

        this.cachedSamlPrivateKey = keyFactory.generatePrivate(keySpec);
      } catch (Exception e) {

        throw new ServerInternalException(
            "XRI Server Setup Error: Failed to read private key: ", e);
      }
    }

    return this.cachedSamlPrivateKey;
View Full Code Here

    try {

      utf8Namespace = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(namespace));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in namespace: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority namespaceAuthority;

    try {

      namespaceAuthority = this.store.localLookup(authorityPath);
    } catch (StoreException ex) {

      ServerException ex2 = new ServerInternalException("Error while finding namespace authority " + namespace + ".", ex);
      log.warn("", ex2);
      throw ex2;
    }

    if (namespaceAuthority == null) {
View Full Code Here

    try {

      utf8Namespace = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(namespace));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in namespace: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority parentAuthority;

    try {

      parentAuthority = this.store.localLookup(authorityPath);

      if (parentAuthority == null) throw new ServerNotFoundException("Namespace authority " + namespace + " not found.");
    } catch (StoreException ex) {

      ServerException ex2 = new ServerInternalException("Error while finding namespace authority " + namespace + ": " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    // the big goal is to make an XRDS, consisting of one or more XRDs

    XRDS xrds = new XRDS();
    boolean ret;

    // give subclasses a chance to init the XRDS before we begin

    ret = this.initXRDS(
        xrds,
        query,
        signed);

    // if a subclass returned true, it doesn't want us to do any more work

    if (ret == true) {

      log.debug("Subclass handled XRDS completely. Returning it without any more work.");
      return(xrds);
    }

    // generate XRDs for all subsegments in the request

    String utf8Query;

    try {

      utf8Query = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(query));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in query: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRISegment segment = new XRISegment(utf8Query);
View Full Code Here

TOP

Related Classes of org.openxri.exceptions.ServerInternalException

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.