Package it.eng.spagobi.utilities.exceptions

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


    InputStream source = DataSetFactory.class.getResourceAsStream("/datasetTypes.properties");
    Properties p = new Properties();
    try {
      p.load(source);
    } catch (IOException e) {
      throw new SpagoBIRuntimeException("Cannot load configuration from datasetTypes.properties file", e);
    }
    String dsType = dataSetConfig.getType();
    logger.debug("Dataset type: " + dsType);
    String className = p.getProperty(dsType);
    logger.debug("Dataset class: " + className);
    if (className == null) {
      throw new SpagoBIRuntimeException("No dataset class found for dataset type [" + dsType + "]");
    }
    Constructor c = null;
    Object object = null;;
    try {
      c = Class.forName(className).getConstructor(SpagoBiDataSet.class);
      object = c.newInstance(dataSetConfig);
      dataSet = (IDataSet) object;
    } catch (Exception e) {
      throw new SpagoBIRuntimeException("Error while instantiating dataset type [" + dsType
          + "], class [" + className + "]", e);
    }
   
   
//    if ( ScriptDataSet.DS_TYPE.equals( dataSetConfig.getType() ) ) {
View Full Code Here


    IDataSource dataSource;
    IDriver driver;
   
    driver = drivers.get(driverName);
    if(driver == null) {
      throw new SpagoBIRuntimeException("No suitable driver for id [" + driverName + "]");
    }
   
    driver.setDataSourceCacheEnabled(cache);
   
    dataSource = driver.getDataSource(configuration);
View Full Code Here

      return SpagoBIConstants.PERMISSION_ON_FOLDER_TO_DEVELOP;
    }
    if (SpagoBIConstants.DOC_STATE_TEST.equals(documentState)) {
      return SpagoBIConstants.PERMISSION_ON_FOLDER_TO_TEST;
    }
    throw new SpagoBIRuntimeException("Document state [" + documentState + "] not valid!!");
  }
View Full Code Here

  public IDataSource getDataSource(IDataSourceConfiguration configuration) {
    IDataSource dataSource;
    String dataSourceName;
   
    if(maxDataSource > 0 && openedDataSource == maxDataSource) {
      throw new SpagoBIRuntimeException("Maximum  number of open data sources reached");
    }
   
    dataSource = null;
    dataSourceName = namingStrategy.getDataSourceName(configuration);
   
View Full Code Here

  public IDataSource getDataSource(IDataSourceConfiguration configuration) {
    IDataSource dataSource;
    String dataSourceName;
   
    if(maxDataSource > 0 && openedDataSource == maxDataSource) {
      throw new SpagoBIRuntimeException("Maximum  number of open data sources reached");
    }
   
    dataSource = null;
    dataSourceName = namingStrategy.getDataSourceName(configuration);
   
View Full Code Here

    try {
      jarFile = new JarFile( modelJarFile );     
      properties = getLabelProperties(jarFile, locale);
     
    } catch (Throwable t) {
      throw new SpagoBIRuntimeException("Impossible to load i18n properties from file [" + modelJarFile + "]", t);
    }finally{
      try {
        if(jarFile!=null){
          jarFile.close();
        }
View Full Code Here

        properties.load(modelJarFile.getInputStream(zipEntry));
      }    
     
      return properties;
    }catch(IOException ioe){
      throw new SpagoBIRuntimeException("Impossible to load properties from file [" + zipEntry + "]");
    }

  }
View Full Code Here

            } else{
                dialectName = "hibernate";
            }
        } catch (Throwable t) {
            logger.error("Impossible to read jar file [" + jarFile + "]",t);
            throw new SpagoBIRuntimeException("Impossible to read jar file [" + jarFile + "]", t);
        }


        logger.debug("OUT: "+jarFile+" has the dialect: "+dialectName);
        return dialectName;
View Full Code Here

      templateJSON = (JSONObject)template;
    } else {
      try {
        templateJSON = new JSONObject(template);
      } catch (Throwable t) {
        throw new SpagoBIRuntimeException("Impossible to parse template", t);
      }
    }
       
    setTemplate(templateJSON);   
  }
View Full Code Here

      propertyValue = modelProperties.getProperty(item, property.getName());
     
      // property not set
      if(propertyValue == null) {
        if(property.isOptional() == false) {
          throw new SpagoBIRuntimeException("Impossible to initialize property [" + property.getName() + "] of structure [" + item.getName() + "]");
        }
        propertyValue = property.getDefaultValue();
      }
     
      item.getProperties().put(property.getName(), propertyValue);
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.