Examples of StoreSequenceException


Examples of org.g4studio.core.id.StoreSequenceException

    }
    URL url = Hello.class.getClassLoader().getResource(this.filePath);
    if (url == null) {
      final String msg = "存储sequence失败!没有发现文件:" + filePath;
      logger.error(msg);
      throw new StoreSequenceException(msg);
    }
    return url.getFile();
  }
View Full Code Here

Examples of org.g4studio.core.id.StoreSequenceException

        return Long.parseLong(result);
      }
    } catch (FileNotFoundException e) {
      final String msg = "存储sequence失败!没有发现文件:" + realFilePath;
      logger.error(msg, e);
      throw new StoreSequenceException(msg, e);
    } catch (IOException e) {
      final String msg = "存储sequence失败!" + e.getMessage();
      logger.error(msg, e);
      throw new StoreSequenceException(msg, e);
    } finally {
      if (is != null) {
        try {
          is.close();
        } catch (IOException e) {
View Full Code Here

Examples of org.g4studio.core.id.StoreSequenceException

      props.load(is);
      props.setProperty(sequenceID, sequence + "");
    } catch (FileNotFoundException e) {
      final String msg = "存储sequence失败!没有发现文件:" + realFilePath;
      logger.error(msg, e);
      throw new StoreSequenceException(msg, e);
    } catch (IOException e) {
      final String msg = "存储sequence失败!" + e.getMessage();
      logger.error(msg, e);
      throw new StoreSequenceException(msg, e);
    } finally {
      if (is != null) {
        try {
          is.close();
        } catch (IOException e) {
          final String msg = "关闭文件:" + realFilePath + "失败!" + e.getMessage();
          logger.debug(msg, e);
        }
      }
    }

    java.io.FileOutputStream out = null;
    try {
      out = new java.io.FileOutputStream(realFilePath);
      props.store(out, "e3 id sequence storer, don't edit");
    } catch (FileNotFoundException e) {
      final String msg = "存储sequence失败!没有发现文件:" + realFilePath;
      logger.error(msg, e);
      throw new StoreSequenceException(msg, e);
    } catch (IOException e) {
      final String msg = "存储sequence失败!" + e.getMessage();
      logger.error(msg, e);
      throw new StoreSequenceException(msg, e);
    } finally {
      if (out != null) {
        try {
          out.close();
        } catch (IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.