java.sql.SQLException: Io 异常:The Network Adapter could not establish the connect
来源:互联网 发布:淘宝女装折扣店 编辑:程序博客网 时间:2024/06/05 14:39
java.sql.SQLException: Io 异常:The Network Adapter could not establish the connect
运行java代码测试连接oracle数据库时报如下错误:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.hb.util.DBHelper.getConn(DBHelper.java:20)
at com.hb.util.DBHelper.main(DBHelper.java:41)
原因已经找到,因为安装oracle时配置了一个固定IP地址,所以必须讲url里面的localhost改成那个固定的IP地址。如图所示:
改了以后就可以了:
- java.sql.SQLException: Io 异常:The Network Adapter could not establish the connect
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection解决方案
- 关于java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
- (java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection)
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection可能问题之一
- Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
- 异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection
- Java.Sql.Sqlexception: Io Exception: The Network Adapter Could Not Establish The Connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 冒泡排序(改良)
- cocos2dx 碰撞
- oracle练习1-删除scott用户,并重建
- iOS7中改变导航栏的标题
- 查询当前设备的总空间 剩余空间 用户占用空间
- java.sql.SQLException: Io 异常:The Network Adapter could not establish the connect
- 相似图片搜索的原理
- 解决OutOfMemorError(内存不足)的方法
- TOJ 1005
- 设计模式(九)外观模式Facade(结构型)
- JXNUOJ_1925:特殊排序
- oracle 游标
- TCP/IP、Http、Socket的区别
- opencv was built without SURF support