Oracle相关异常处理

1、java.sql.SQLException: The Network Adapter could not establish the connection

  原因:

    1)oracle服务未启动:OracleServiceORCL,OracleOraDb11g_home1TNSListener服务和监听启动后才能使用数据库

2、从数据库取出一个 Count函数 统计的值在代码中要转成Integer类型的时候Integer.parseInt((String)map.get("ID_")) 

  报了一下错误: Java.math.BigDecimal cannot be cast to java.lang.String

  解决方法:

  Object ob = map.get("ID_");

  Integer.parseInt(ob.toString());

 

posted @ 2017-01-19 20:39  九三x  阅读(153)  评论(0编辑  收藏  举报