Package it.eng.spagobi.utilities.engines

Examples of it.eng.spagobi.utilities.engines.SpagoBIEngineException


        logger.warn("Row data encoding version [" + encodingFormatVersion + "] does not match with the current version used by the engine [" + CURRENT_VERSION + "] ");
        logger.debug("Converting from encoding version [" + encodingFormatVersion + "] to encoding version [" + CURRENT_VERSION + "]....");
        IWorksheetStateLoader worksheetViewerStateLoader;
        worksheetViewerStateLoader = WorksheetStateLoaderFactory.getInstance().getLoader(encodingFormatVersion);
        if (worksheetViewerStateLoader == null) {
          throw new SpagoBIEngineException("Unable to load data stored in format [" + encodingFormatVersion + "] ");
        }
        worksheetStateJSON = (JSONObject) worksheetViewerStateLoader.load(str);
        logger.debug("Encoding conversion has been executed succesfully");
      }
     
      logger.debug("analysis state loaded succsfully from row data");
     
      //set the worksheet into the qbe instance
      WorkSheetDefinition workSheetDefinition = (WorkSheetDefinition) SerializationManager.deserialize(worksheetStateJSON, "application/json", WorkSheetDefinition.class);
      this.setWorkSheet(workSheetDefinition.getWorkSheet());
     
    } catch (Exception e) {
      throw new SpagoBIEngineException("Impossible to load form state from raw data", e);
    } finally {
      logger.debug("OUT");
    }
   
  }
View Full Code Here


    try {
      worksheetJSON = (JSONObject) SerializationManager.serialize(this, "application/json");
      worksheetJSON.put("version", CURRENT_VERSION);
      rowData = worksheetJSON.toString();
    } catch (Throwable e) {
      throw new SpagoBIEngineException("Impossible to store form state", e);
    }
   
    return rowData.getBytes();
  }
View Full Code Here

            stream.close();
          }
        }

      } else {
        throw new SpagoBIEngineException("Cannot export worksheet in " + mimeType + " format, only application/vnd.ms-excel ans application/pdf are supported");
      }
     
      try {       
        writeBackToClient(exportFile, null, writeBackResponseInline, exportFile.getName(), mimeType);
      } catch (IOException ioe) {
        throw new SpagoBIEngineException("Impossible to write back the responce to the client", ioe);
      }
     
    } catch (Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
    } finally {
View Full Code Here

          // instant cleaning
          reportFile.delete();

          servletIOManager.auditServiceEndEvent();
        } catch(Throwable t) {
          throw new SpagoBIEngineException("An error occurred while executing report. Check log file for more information", t);
        } finally {
          logger.debug("OUT");          
        }       

  }
View Full Code Here

      String templateContent = templateBuilder.buildTemplate();
      logger.debug(templateContent);
      try {
        reportFile = File.createTempFile("report", ".rpt");
      } catch (IOException ioe) {
        throw new SpagoBIEngineException("Impossible to create a temporary file to store the template generated on the fly", ioe);
      }
     
      JasperReportRunner runner = new JasperReportRunner();
      JRSpagoBIDataStoreDataSource dataSource = new JRSpagoBIDataStoreDataSource( dataStore );
      Locale locale = this.getLocale();
      try {
        runner.run( templateContent, reportFile, mimeType, dataSource, locale);
      catch (Exception e) {
        throw new SpagoBIEngineException("Impossible compile or to export the report", e);
      }
     
     
      writeBackResponseInline = RESPONSE_TYPE_INLINE.equalsIgnoreCase(responseType);
      //fileExtension = MimeUtils.getFileExtension( mimeType );
      //fileExtension = fileExtension != null? fileExtension: DEFAULT_FILE_EXTENSION;
      fileName = "report"; //, +  "." + fileExtension;
     
     
      try {       
        writeBackToClient(reportFile, null, writeBackResponseInline, fileName, mimeType);
      } catch (IOException ioe) {
        throw new SpagoBIEngineException("Impossible to write back the responce to the client", ioe);
     
     
     
    } catch(Throwable t) {
      logger.error("Impossible to export doc", t);
View Full Code Here

      try {
        runtimeRepository.runJob(job, servletIOManager.getEnv());
      } catch (JobNotFoundException ex) {
        logger.error(ex.getMessage());

        throw new SpagoBIEngineException("Job not found",
            "job.not.existing");
   
      } catch (ContextNotFoundException ex) {
        logger.error(ex.getMessage(), ex);
       
        throw new SpagoBIEngineException("Context script not found",
            "context.script.not.existing");
     
      } catch(JobExecutionException ex) {
        logger.error(ex.getMessage(), ex);
       
        throw new SpagoBIEngineException("Job execution error",
            "job.exectuion.error");
       
      } catch (Exception e) {
        logger.error(e.getMessage(), e);
       
        throw new SpagoBIEngineException("Job execution error",
            "job.exectuion.error");
      }

     
      servletIOManager.tryToWriteBackToClient("etl.process.started");
View Full Code Here

  }
 
 
  public static WorksRepository getWorksRepository() throws SpagoBIEngineException {
    if(worksRepository == null || !worksRepository.getRootDir().exists()) {
      throw new SpagoBIEngineException("Works-Repository not available",
          "repository.not.available");
    }
    return CommonjEngine.worksRepository;
  }
View Full Code Here

  }
 
 
  public static RuntimeRepository getRuntimeRepository() throws SpagoBIEngineException {
    if(runtimeRepository == null || !runtimeRepository.getRootDir().exists()) {
      throw new SpagoBIEngineException("Runtime-Repository not available",
          "repository.not.available");
    }
    return TalendEngine.runtimeRepository;
  }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.utilities.engines.SpagoBIEngineException

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.