Package org.saiku.service.util.exception

Examples of org.saiku.service.util.exception.SaikuServiceException


      log.debug("Delete repository file: " + file);

      IUserContentAccess access = contentAccessFactory.getUserContentAccess(null);

      if( !access.fileExists(file) && access.hasAccess(file, FileAccess.DELETE)) {
        throw new SaikuServiceException("Access to Repository has failed File does not exist or no delete right: " + file);
      }
      boolean ok = access.deleteFile(file);
      if (!ok) {
        throw new SaikuServiceException("Failed to write file: " + file);
      }
      return Response.ok().build();
    }
    catch(Exception e){
      log.error("Cannot load file from repository (" + file + ")",e);
View Full Code Here


      final String fileType = type;
      IUserContentAccess access = contentAccessFactory.getUserContentAccess(null);
     
      if( !access.fileExists(directory) && access.hasAccess(directory, FileAccess.READ)) {
        throw new SaikuServiceException("Access to Repository has failed File does not exist or no read right: " + directory);
      }
     
      IBasicFileFilter txtFilter = StringUtils.isBlank(type) ? null : new IBasicFileFilter() {
        public boolean accept(IBasicFile file) {
          return file.isDirectory() || file.getExtension().equals(fileType);
View Full Code Here

        try {
          Statement statement = rs.getStatement();
          statement.close();
          rs.close();
        } catch (SQLException e) {
          throw new SaikuServiceException(e);
        } finally {
          rs = null;
        }
      }
    }
View Full Code Here

      } else {
        putIQuery(name, query);
      }
      return ObjectUtil.convert(query);
    } catch (Exception e) {
      throw new SaikuServiceException("Error creating query from xml", e);
    }
  }
View Full Code Here

    try {
      IQuery q = getIQuery(queryName);
      q.cancel();
      removeIQuery(queryName);
    } catch (Exception e) {
      throw new SaikuServiceException("Error closing query: " + queryName, e);
    }
  }
View Full Code Here

      //System.out.println("Cancel: ID " + Thread.currentThread().getId() + " Name: " +
      // Thread.currentThread().getName());
      IQuery q = getIQuery(queryName);
      q.cancel();
    } catch (Exception e) {
      throw new SaikuServiceException("Error cancelling query: " + queryName, e);
    }
  }
View Full Code Here

    } catch (Exception e) {
      if (LOG.isInfoEnabled()) {
        String error = ExceptionUtils.getRootCauseMessage(e);
        LOG.info(runId + "\tException: " + error);
      }
      throw new SaikuServiceException(runId + "\tCan't execute query: " + queryName, e);
    } catch (Error e) {
      if (LOG.isInfoEnabled()) {
        String error = ExceptionUtils.getRootCauseMessage(e);
        LOG.info(runId + "\tError: " + error);
      }
      throw new SaikuServiceException(runId + "\tCan't execute query: " + queryName, e);
    }
  }
View Full Code Here

    try {
      IQuery query = getIQuery(queryName);
      OlapConnection con = olapDiscoverService.getNativeConnection(query.getSaikuCube().getConnection());
      return ObjectUtil.convert(applyTag(query, con, tag));
    } catch (Exception e) {
      throw new SaikuServiceException("Can't apply tag: " + tag + " to query " + queryName, e);
    }
  }
View Full Code Here

      mdx = "EXPLAIN PLAN FOR \n" + mdx;
      ResultSet rs = stmt.executeQuery(mdx);
      return rs;

    } catch (Exception e) {
      throw new SaikuServiceException("Error EXPLAIN: " + queryName, e);
    } finally {
      try {
        if (stmt != null) {
          stmt.close();
        }
View Full Code Here

  public boolean isMdxDrillthrough(String queryName, String drillthroughMdx) {
    try {
      final OlapConnection con = olapDiscoverService.getNativeConnection(getQuery(queryName).getCube().getConnection());
      return SaikuMondrianHelper.isMondrianDrillthrough(con, drillthroughMdx);
    } catch (Exception e) {
      throw new SaikuServiceException(
          "Error checking for DRILLTHROUGH: " + queryName + " DRILLTHROUGH MDX:" + drillthroughMdx, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.saiku.service.util.exception.SaikuServiceException

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.