Package it.eng.spagobi.utilities.exceptions

Examples of it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException


      if(toconvert) {
        result = JavaClassUtils.convertResult(result);
      }
      dataStore = dataReader.read(result);
    } catch (Throwable t) {
      throw new SpagoBIRuntimeException("Impossible to load dataset", t);
    }

    return dataStore;
  }
View Full Code Here


    try{
      addressToCall=new URL(address);
    }
    catch (Exception e) {
      throw new SpagoBIRuntimeException("Invalid URL [" + address + "]", e);
    }
    try {
      connector = locator.getWSDataSetService(addressToCall);

    } catch (ServiceException e) {
      throw new SpagoBIRuntimeException("DataSetService not available", e);
    }
   
    // Add the profile Attributes

    try {
      parameters = addProfileAtributes(parameters);
    } catch (Exception e) {
      throw new SpagoBIRuntimeException("An error occurred while resolving profile attributes", e);
    }
   
    try {
      resultXML=connector.readDataSet(address, parameters, operation);
    } catch (RemoteException e) {
      throw new SpagoBIRuntimeException("DataSetService not available", e);
    }   

    try {
      dataStore = dataReader.read(resultXML);
    } catch (Exception e) {
      throw new SpagoBIRuntimeException("Impossible to parse responde [" + resultXML + "]", e);
    }
   
    return dataStore;

  }
View Full Code Here

        try{
          Map parTypeMap = getParTypeMap(getTargetDataSet());
          statement = StringUtilities.substituteDatasetParametersInString(statement, getTargetDataSet().getParamsMap(), parTypeMap ,false );
        }
        catch (Throwable e) {
          throw new SpagoBIRuntimeException("An error occurred while settin up parameters",e);
        }
      } 

      // after having substituted all parameters check there are not other parameters unfilled otherwise throw an exception;
      List<String> parsUnfilled = checkParametersUnfilled(statement);
View Full Code Here

      try {
        schema = (String)userProfile.get(getDataSource().getSchemaAttribute());
        ((JDBCDataProxy)dataProxy).setSchema(schema);
        logger.debug("Set UP Schema="+schema);
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("An error occurred while reading schema name from user profile", t)
      }   
    }
  }
View Full Code Here

        logger.debug(t);
        resPath = EnginConf.getInstance().getResourcePath();
      }
      }
    if (resPath == null) {
      throw new SpagoBIRuntimeException("Resource path not found!!!");
    }
    return resPath;
  }
View Full Code Here

    try {     
     
      try {
        stmt = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("An error occurred while creating connection steatment", t);
      }
     
     
          try {
            //get max size
            if(getMaxResults() > 0){
              stmt.setMaxRows(getMaxResults());
            }
        resultSet = stmt.executeQuery( getStatement() );
       
      } catch (Throwable t) {
        logger.error("Trovata!:",t);
        throw new SpagoBIRuntimeException("An error occurred while executing statement", t);
      }
     
      dataStore = null;
      try {
        dataStore = dataReader.read( resultSet );
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("An error occurred while parsing resultset", t);
      }
     
      if( isCalculateResultNumberOnLoadEnabled() ) {
       
      }
     
    } finally {   
      try {
        releaseResources(null, stmt, resultSet);
      } catch(Throwable t) {
        throw new SpagoBIRuntimeException("Impossible to release allocated resources properly", t);
      }
    }
   
    return dataStore;
  }
View Full Code Here

      if(resultSet != null) {
        try {
          resultSet.close();

        } catch (SQLException e) {
          throw new SpagoBIRuntimeException("Impossible to release [resultSet]", e);
        }
        logger.debug("[resultSet] released succesfully");
      }
     
      if(statement != null) {
        try {
          statement.close();
         
        } catch (SQLException e) {
          throw new SpagoBIRuntimeException("Impossible to release [statement]", e);
        }
        logger.debug("[statement] released succesfully");
      }
     
      if(connection != null) {
        try {
          if (!connection.isClosed()) {
              connection.close();
          }
        } catch (SQLException e) {
          throw new SpagoBIRuntimeException("Impossible to release [connection]", e);
        }
        logger.debug("[connection] released succesfully");
      }   
      logger.debug("All resources have been released succesfully");
    } finally {
View Full Code Here

      filePath+="/"+fileName;
      inputStream = new FileInputStream(filePath);
      dataStore = dataReader.read( inputStream );
    }
    catch (Throwable t) {
      throw new SpagoBIRuntimeException("Impossible to load dataset", t);
    } finally {
      if (inputStream != null) {
        try {
          inputStream.close();
        } catch (IOException e) {
View Full Code Here

   
    try {     
      try {
        connection = getDataSource().getConnection( getSchema() );
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("An error occurred while creating connection", t);
      }
     
      try {
        stmt = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("An error occurred while creating connection steatment", t);
      }
     
     
          try {
            //get max size
            if(getMaxResults() > 0){
              stmt.setMaxRows(getMaxResults());
            }
        resultSet = stmt.executeQuery( getStatement() );
       
      } catch (Throwable t) {
        logger.error("Trovata!:",t);
        throw new SpagoBIRuntimeException("An error occurred while executing statement", t);
      }
     
      dataStore = null;
      try {
        dataStore = dataReader.read( resultSet );
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("An error occurred while parsing resultset", t);
      }
     
      if( isCalculateResultNumberOnLoadEnabled() ) {
       
      }
     
    } finally {   
      try {
        releaseResources(connection, stmt, resultSet);
      } catch(Throwable t) {
        throw new SpagoBIRuntimeException("Impossible to release allocated resources properly", t);
      }
    }
   
    return dataStore;
  }
View Full Code Here

      if(resultSet != null) {
        try {
          resultSet.close();

        } catch (SQLException e) {
          throw new SpagoBIRuntimeException("Impossible to release [resultSet]", e);
        }
        logger.debug("[resultSet] released succesfully");
      }
     
      if(statement != null) {
        try {
          statement.close();
         
        } catch (SQLException e) {
          throw new SpagoBIRuntimeException("Impossible to release [statement]", e);
        }
        logger.debug("[statement] released succesfully");
      }
     
      if(connection != null) {
        try {
          if (!connection.isClosed()) {
              connection.close();
          }
        } catch (SQLException e) {
          throw new SpagoBIRuntimeException("Impossible to release [connection]", e);
        }
        logger.debug("[connection] released succesfully");
      }   
      logger.debug("All resources have been released succesfully");
    } finally {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException

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.