Package it.eng.spago.error

Examples of it.eng.spago.error.EMFInternalError


      Class mapperClass = Class.forName("it.eng.spago.dbaccess.sql.mappers.OracleSQLMapper");
      SQLMapper sqlMapper = (SQLMapper)mapperClass.newInstance();
      dataCon = new DataConnection(con, "2.1", sqlMapper);
    } catch(Exception e) {
      logger.error("Error while getting Data Source " + e);
      throw new EMFInternalError(EMFErrorSeverity.ERROR, "cannot build spago DataConnection object");
    }
    return dataCon;
  }
View Full Code Here


   *
   */
  private static HashMap getPredefinedProfileAttributes(String userUniqueIdentifier) throws EMFInternalError {
    SourceBean profileAttrsSB = getProfileAttributesSourceBean();
    if (profileAttrsSB == null) {
      throw new EMFInternalError(EMFErrorSeverity.ERROR,
          "Profile attributes attribute not found in ConfigSingleton");
    }
    HashMap attrsMap = new HashMap();
    if (profileAttrsSB == null) return attrsMap;
    SourceBean userProfileAttrsSB = (SourceBean)
View Full Code Here

   *
   */
  private static HashMap getAllDefaultProfileAttributes(HashMap exoProfileAttrs) throws EMFInternalError {
    SourceBean profileAttrsSB = getProfileAttributesSourceBean();
    if (profileAttrsSB == null) {
      throw new EMFInternalError(EMFErrorSeverity.ERROR,
          "Profile attributes attribute not found in ConfigSingleton");
    }
    HashMap toReturn = new HashMap();
    List attrs = profileAttrsSB.getAttributeAsList("ATTRIBUTE");
    if (attrs != null && attrs.size() > 0) {
      Iterator iterAttrs = attrs.iterator();
      SourceBean attrSB = null;
      String nameattr = null;
      String source = null;
      String defaultvalue = null;
      while(iterAttrs.hasNext()) {
        attrSB = (SourceBean) iterAttrs.next();
        if (attrSB == null)
          continue;
        source = (String) attrSB.getAttribute("source");
        nameattr = (String) attrSB.getAttribute("name");
        if (nameattr == null) {
          throw new EMFInternalError(EMFErrorSeverity.ERROR,
              "Attribute 'name' missing in SourceBean\n" + attrSB.toXML(false));
        }
        defaultvalue = (String) attrSB.getAttribute("default");
        if ("absolute".equalsIgnoreCase(source)) {
          toReturn.put(nameattr, defaultvalue);
        } else if ("exo".equalsIgnoreCase(source)) {
          String exoname = (String) attrSB.getAttribute("exoname");
          if (exoname == null) {
            throw new EMFInternalError(EMFErrorSeverity.ERROR,
                "Attribute 'exoname', required for attributes with source='exo', " +
                "missing in SourceBean\n" + attrSB.toXML(false));
          }
          String exovalue = (String) exoProfileAttrs.get(exoname);
          if (exovalue != null) toReturn.put(nameattr, exovalue);
          else toReturn.put(nameattr, defaultvalue);
        } else {
          throw new EMFInternalError(EMFErrorSeverity.ERROR,
              "Source '" + source + "' not recognized in SourceBean\n" + attrSB.toXML(false));
        }
      }
    }
    return toReturn;
View Full Code Here

  }
 
  public static List getAllProfileAtributesNames () throws EMFInternalError {
    SourceBean profileAttrsSB = getProfileAttributesSourceBean();
    if (profileAttrsSB == null) {
      throw new EMFInternalError(EMFErrorSeverity.ERROR,
          "Profile attributes attribute not found in ConfigSingleton");
    }
    List toReturn = new ArrayList();
    List attrs = profileAttrsSB.getAttributeAsList("ATTRIBUTE");
    if (attrs != null && attrs.size() > 0) {
      Iterator iterAttrs = attrs.iterator();
      SourceBean attrSB = null;
      String nameattr = null;
      while(iterAttrs.hasNext()) {
        attrSB = (SourceBean) iterAttrs.next();
        if (attrSB == null)
          continue;
        nameattr = (String) attrSB.getAttribute("name");
        if (nameattr == null) {
          throw new EMFInternalError(EMFErrorSeverity.ERROR,
              "Attribute 'name' missing in SourceBean\n" + attrSB.toXML(false));
        }
        toReturn.add(nameattr);
      }
    }
View Full Code Here

    } catch (EMFUserError eex) {
      errorHandler.addError(eex);
      return;
    } catch (Exception ex) {
      EMFInternalError internalError = new EMFInternalError(EMFErrorSeverity.ERROR, ex);
      errorHandler.addError(internalError);
      return;
    }
  }
View Full Code Here

    } catch (EMFUserError eex) {
      errorHandler.addError(eex);
      return;
    } catch (Exception ex) {
      EMFInternalError internalError = new EMFInternalError(EMFErrorSeverity.ERROR, ex);
      errorHandler.addError(internalError);
      return;
    }
  }
View Full Code Here

              coordinator = DispatcherManager.getCoordinator(requestContext);
              if (coordinator == null) {
                  TracerSingleton.log(Constants.NOME_MODULO, TracerSingleton.WARNING,
                          "AdapterHTTP::service: coordinator nullo !");
                  serviceException = new Exception("Coordinatore non trovato");
                  emfErrorHandler.addError(new EMFInternalError(EMFErrorSeverity.ERROR,
                          "Coordinatore non trovato !"));
              } // if (coordinator == null)
              else {
                  ((RequestContextIFace) coordinator).setRequestContext(requestContext);
                  responseContainer.setBusinessType(coordinator.getBusinessType());
View Full Code Here

   * @throws EMFInternalError the EMF internal error
   */
  public static HashMap getAllProfileAttributes(IEngUserProfile profile) throws EMFInternalError {
    logger.debug("IN");
    if (profile == null)
      throw new EMFInternalError(EMFErrorSeverity.ERROR,
      "getAllProfileAttributes method invoked with null input profile object");
    HashMap profileattrs = new HashMap();
    Collection profileattrsNames = profile.getUserAttributeNames();
    if (profileattrsNames == null || profileattrsNames.size() == 0)
      return profileattrs;
View Full Code Here

  }
 
  private static JSONObject createResponseContent(EMFAbstractError error) throws JSONException {
    JSONObject jsonObject = new JSONObject();
    if (error instanceof EMFInternalError) {
      EMFInternalError internalError = (EMFInternalError) error;
      Exception e = internalError.getNativeException();
      if (e != null && e instanceof SpagoBIServiceException) {
        SpagoBIServiceException serviceError = (SpagoBIServiceException) e;
        jsonObject = createResponseContent(serviceError);
      } else {
        jsonObject = createResponseContent(internalError);
View Full Code Here

      it = errors.iterator();
      while(it.hasNext()) {
        Object o = it.next();
        logger.debug("Error type [" + o.getClass().getName()+ "]");
        if(o instanceof EMFInternalError) {
          EMFInternalError error = (EMFInternalError)o;
          Exception e = error.getNativeException();
          if(e instanceof SpagoBIEngineStartupException) {
            SpagoBIEngineStartupException serviceError = (SpagoBIEngineStartupException)e;
            logError(serviceError);
          } else {
            logger.error("Unespected exception",e);   
View Full Code Here

TOP

Related Classes of it.eng.spago.error.EMFInternalError

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.