Package com.ibatis.common.exception

Examples of com.ibatis.common.exception.NestedRuntimeException


      StreamResult result = new StreamResult(writer);
      transformer.transform(source, result);
      s = writer.getBuffer().toString();

    } catch (TransformerException e) {
      throw new NestedRuntimeException("Error occurred.  Cause: " + e, e);
    }

    return s;
  }
View Full Code Here


    try {
      prevPageList = currentPageList;
      currentPageList = nextPageList;
      nextPageList = getList(index + 1, pageSize);
    } catch (SQLException e) {
      throw new NestedRuntimeException("Unexpected error while repaginating paged list.  Cause: " + e, e);
    }
  }
View Full Code Here

        prevPageList = getList(index - 1, pageSize);
      } else {
        prevPageList = new ArrayList();
      }
    } catch (SQLException e) {
      throw new NestedRuntimeException("Unexpected error while repaginating paged list.  Cause: " + e, e);
    }
  }
View Full Code Here

  private void safePageTo(int idx) {
    try {
      pageTo(idx);
    } catch (SQLException e) {
      throw new NestedRuntimeException("Unexpected error while repaginating paged list.  Cause: " + e, e);
    }
  }
View Full Code Here

      // Parse input file
      Document doc = db.parse(new ReaderInputStream(reader));
      return doc;
    } catch (Exception e) {
      throw new NestedRuntimeException("XML Parser Error.  Cause: " + e);
    }
  }
View Full Code Here

    try {
      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
      return documentBuilder.parse(new ReaderInputStream(new StringReader(s)));
    } catch (Exception e) {
      throw new NestedRuntimeException("Error occurred.  Cause: " + e, e);
    }
  }
View Full Code Here

          throw new SqlMapException("Could not convert document because DOCTYPE was not recognized: " + docType);
        }
      }
      transformXml(xsl, xml, writer);
    } catch (IOException e) {
      throw new NestedRuntimeException("Error.  Cause: " + e, e);
    } catch (TransformerException e) {
      throw new NestedRuntimeException("Error.  Cause: " + e, e);
    }
  }
View Full Code Here

      }

      parser.parse(reader);
      return vars.client;
    } catch (Exception e) {
      throw new NestedRuntimeException("Error occurred.  Cause: " + e, e);
    }
  }
View Full Code Here

            String statementName = (String) statementNames.next();
            MappedStatement statement = vars.client.getDelegate().getMappedStatement(statementName);
            if (statement != null) {
              statement.addExecuteListener(cacheModel);
            } else {
              throw new NestedRuntimeException("Could not find statement named '" + statementName + "' for use as a flush trigger for the cache model named '" + cacheName + "'.");
            }
          }
        }
      }
    });
View Full Code Here

            props = Resources.getResourceAsProperties(resource);
          } else if (url != null) {
            vars.errorCtx.setResource(url);
            props = Resources.getUrlAsProperties(url);
          } else {
            throw new NestedRuntimeException("The " + "properties" + " element requires either a resource or a url attribute.");
          }

          if (vars.properties == null) {
            vars.properties = props;
          } else {
            props.putAll(vars.properties);
            vars.properties = props;
          }
        } catch (Exception e) {
          throw new NestedRuntimeException("Error loading properties.  Cause: " + e);
        }
      }
    });
  }
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.