Package com.ibatis.common.exception

Examples of com.ibatis.common.exception.NestedRuntimeException


      } else if (args.length == 3) {
        // Backward compatibility before autodetect
        CONVERTER.convertFile(args[1], args[2]);
      }
    } catch (IOException e) {
      throw new NestedRuntimeException("Error running SQL Map Upgrade Tool.  Cause: " + e, e);
    }
  }
View Full Code Here


      this.pool = Collections.synchronizedList(new ArrayList(size));
      for (int i=0; i < size; i++) {
        this.pool.add(type.newInstance());
      }
    } catch (Exception e) {
      throw new NestedRuntimeException("Error instantiating class.  Cause: " + e, e);
    }
  }
View Full Code Here

      Object object = resultObject;
      if (object == null) {
        try {
          object = Resources.instantiate(resultMap.getResultClass());
        } catch (Exception e) {
          throw new NestedRuntimeException("JavaBeansDataExchange could not instantiate result class.  Cause: " + e, e);
        }
      }
      ResultMapping[] mappings = resultMap.getResultMappings();
      for (int i = 0; i < mappings.length; i++) {
        PROBE.setObject(object, mappings[i].getPropertyName(), values[i]);
View Full Code Here

      Object object = parameterObject;
      if (object == null) {
        try {
          object = Resources.instantiate(parameterMap.getParameterClass());
        } catch (Exception e) {
          throw new NestedRuntimeException("JavaBeansDataExchange could not instantiate result class.  Cause: " + e, e);
        }
      }
      ParameterMapping[] mappings = parameterMap.getParameterMappings();
      for (int i = 0; i < mappings.length; i++) {
        if (mappings[i].isOutputAllowed()) {
View Full Code Here

          } catch (InterruptedException e) {
            //ignore
          }
          waitTime = System.currentTimeMillis() - waitTime;
          if (waitTime > maxWait) {
            throw new NestedRuntimeException("Throttle waited too long (" + waitTime + ") for lock.");
          }
        } else {
          try {
            LOCK.wait();
          } catch (InterruptedException e) {
View Full Code Here

  public void initialize(Map properties) {
  }

  public Object[] getData(RequestScope request, ParameterMap parameterMap, Object parameterObject) {
    if (!(parameterObject instanceof Map)) {
      throw new NestedRuntimeException("Error.  Object passed into MapDataExchange was not an instance of Map.");
    }

    Object[] data = new Object[parameterMap.getParameterMappings().length];
    Map map = (Map) parameterObject;
    ParameterMapping[] mappings = parameterMap.getParameterMappings();
View Full Code Here

    return data;
  }

  public Object setData(RequestScope request, ResultMap resultMap, Object resultObject, Object[] values) {
    if (!(resultObject == null || resultObject instanceof Map)) {
      throw new NestedRuntimeException("Error.  Object passed into MapDataExchange was not an instance of Map.");
    }

    Map map = (Map) resultObject;
    if (map == null) {
      map = new HashMap();
View Full Code Here

    return map;
  }

  public Object setData(RequestScope request, ParameterMap parameterMap, Object parameterObject, Object[] values) {
    if (!(parameterObject == null || parameterObject instanceof Map)) {
      throw new NestedRuntimeException("Error.  Object passed into MapDataExchange was not an instance of Map.");
    }

    Map map = (Map) parameterObject;
    if (map == null) {
      map = new HashMap();
View Full Code Here

      if (object == null) {
        errorContext.setMoreInfo("The error occured while instantiating the result object");
        try {
          object = Resources.instantiate(resultMap.getResultClass());
        } catch (Exception e) {
          throw new NestedRuntimeException("JavaBeansDataExchange could not instantiate result class.  Cause: " + e, e);
        }
      }
      errorContext.setMoreInfo("The error happened while setting a property on the result object.");
      resultPlan.setProperties(object, values);
      return object;
View Full Code Here

      Object object = parameterObject;
      if (object == null) {
        try {
          object = Resources.instantiate(parameterMap.getParameterClass());
        } catch (Exception e) {
          throw new NestedRuntimeException("JavaBeansDataExchange could not instantiate parameter class. Cause: " + e, e);
        }
      }
      values = getOutputParamValues(parameterMap.getParameterMappings(), values);
      outParamPlan.setProperties(object, values);
      return object;
View Full Code Here

TOP

Related Classes of com.ibatis.common.exception.NestedRuntimeException

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.