Package it.eng.spagobi.utilities.engines

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


     
      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
    } catch(Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
    } finally {
View Full Code Here


      type = fieldClaculationDescriptor.getString(QuerySerializationConstants.FIELD_TYPE);
      expression = fieldClaculationDescriptor.getString(QuerySerializationConstants.FIELD_EXPRESSION);
     
      field = new ModelCalculatedField(alias, type, expression);
    } catch (Throwable t) {
      throw new SpagoBIEngineServiceException(getActionName(), "impossible to deserialize calculated field [" + fieldJSON.toString() + "]", t);
    }         
   
   
    return field;
  }
View Full Code Here

     
      try {
        writeBackToClient( new JSONSuccess(nodes) );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
    } catch(Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
    } finally {
View Full Code Here

     
      try {
        writeBackToClient( new JSONSuccess(nodes) );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
    } catch(Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
    } finally {
View Full Code Here

          ISelectField queryField = (ISelectField)queryFields.get(i);
          dataStoreMetadata.changeFieldAlias(i, queryField.getAlias());
        }
      } catch (Exception e) {
        logger.debug("Query execution aborted because of an internal exceptian");
        SpagoBIEngineServiceException exception;
        String message;
       
        message = "An error occurred in " + getActionName() + " service while executing query: [" +  statement.getQueryString() + "]";       
        exception = new SpagoBIEngineServiceException(getActionName(), message, e);
        exception.addHint("Check if the query is properly formed: [" + statement.getQueryString() + "]");
        exception.addHint("Check connection configuration");
        exception.addHint("Check the qbe jar file");
       
        throw exception;
      }
      logger.debug("Query executed succesfully");
     
     
      //dataStore.getMetaData().setProperty("resultNumber", new Integer( (int)dataStore.getRecordsCount() ));
     
      resultNumber = (Integer)dataStore.getMetaData().getProperty("resultNumber");
      Assert.assertNotNull(resultNumber, "property [resultNumber] of the dataStore returned by loadData method of the class [" + dataSet.getClass().getName()+ "] cannot be null");
      logger.debug("Total records: " + resultNumber);     
     
     
      boolean overflow = maxSize != null && resultNumber >= maxSize;
      if (overflow) {
        logger.warn("Query results number [" + resultNumber + "] exceeds max result limit that is [" + maxSize + "]");
        auditlogger.info("[" + userProfile.getUserId() + "]:: max result limit [" + maxSize + "] exceeded with SQL: " + sqlQuery);
      }
           
      dataSetWriter = new JSONDataWriter();
      gridDataFeed = (JSONObject)dataSetWriter.write(dataStore);
     
      try {
        writeBackToClient( new JSONSuccess(gridDataFeed) );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
    } catch(Throwable t) {
      errorHitsMonitor = MonitorFactory.start("QbeEngine.errorHits");
      errorHitsMonitor.stop();
View Full Code Here

       
        dataStore = dataSet.getDataStore();
        Assert.assertNotNull(dataStore, "The dataStore returned by loadData method of the class [" + dataSet.getClass().getName()+ "] cannot be null");
      } catch (Exception e) {
        logger.debug("Query execution aborted because of an internal exceptian");
        SpagoBIEngineServiceException exception;
        String message;
       
        message = "An error occurred in " + getActionName() + " service while executing query: [" +  statement.getQueryString() + "]";       
        exception = new SpagoBIEngineServiceException(getActionName(), message, e);
        exception.addHint("Check if the query is properly formed: [" + statement.getQueryString() + "]");
        exception.addHint("Check connection configuration");
        exception.addHint("Check the qbe jar file");
       
        throw exception;
      }
      logger.debug("Query executed succesfully");
     
      resultNumber = (Integer)dataStore.getMetaData().getProperty("resultNumber");
      Assert.assertNotNull(resultNumber, "property [resultNumber] of the dataStore returned by loadData method of the class [" + dataSet.getClass().getName()+ "] cannot be null");
      logger.debug("Total records: " + resultNumber);     
     
      //serializer = new DataStoreJSONSerializer();
      //gridDataFeed = (JSONObject)serializer.serialize(dataStore);
     
      serializer2 = new LookupStoreJSONSerializer();
      gridDataFeed = (JSONObject)serializer2.serialize(dataStore);
     
      try {
        writeBackToClient( new JSONSuccess(gridDataFeed) );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
    } catch(Throwable t) {
      errorHitsMonitor = MonitorFactory.start("QbeEngine.errorHits");
      errorHitsMonitor.stop();
View Full Code Here

     
      try {
        writeBackToClient(exportFile, null, false, exportFile.getName(), mimetype);
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
    } catch (Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
    } finally {
View Full Code Here

      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }

    } catch (Exception e) {
      throw new SpagoBIServiceException(SERVICE_NAME, "Exception occurred while retrieving metadata", e);
    } finally {
View Full Code Here

        logger.debug("Error type [" + o.getClass().getName()+ "]");
        if(o instanceof EMFInternalError) {
          EMFInternalError error = (EMFInternalError)o;
          Exception e = error.getNativeException();
          if(e instanceof SpagoBIEngineServiceException) {
            SpagoBIEngineServiceException serviceError = (SpagoBIEngineServiceException)e;
            logError(serviceError);
           
            try {
              writeBackToClient( new JSONFailure( serviceError ) );
            } catch (IOException ioe) {
              String message = "Impossible to write back the responce to the client";
              throw new SpagoBIEngineServiceException(getActionName(), message, e);
            } catch (JSONException je) {
              String message = "Error while serializing error into JSON object";
              throw new SpagoBIEngineServiceException(getActionName(), message, je);
            }
          } else {
            logger.error("Unespected exception",e);   
          }
        } else {
View Full Code Here

     
      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String msg = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), msg, e);
      }
     
    } catch (Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
    } finally {
View Full Code Here

TOP

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

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.