Io 异常: The Network Adapter could not establish the connection 解决办法
来源:互联网 发布:图像对比度算法 编辑:程序博客网 时间:2024/06/17 23:46
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at beijing.com.jdbc.learnJDBC.main(learnJDBC.java:42)
Exception in thread "main" java.lang.NullPointerException
at beijing.com.jdbc.learnJDBC.main(learnJDBC.java:72)
其实这个异常在网上很常见,可是今天我遇到的问题与网上我查到的都不同
这个异常明显是提示没有连上数据库。首先确定的是我的用户名、密码 还有服务名都是没错的,oracle的监听也已经打开了,这些我非常确定。难道是数据库出现了异常? 于是我打开了oracle的‘本地net服务名配置’ 进行连接数据库的测试,结果显示测试成功。这是怎么回事啊,一切正常啊。突然我想起了今天在装数据库时,有几次启动监听时 监听会自动关闭。难道是这里搞的鬼?于是在网上查找资料,发现可能是ip地址的问题,尝试使用真实ip地址 在dos环境中执行ipconfig 得到真实ip地址:192.168.0.* 于是将原来的127.0.0.1换成此ip地址。 程序执行后异常没有了。
为什么会出现这种情况呢? 这两天电脑也出问题了, 没声音了 ,小喇叭不见了, 添加小喇叭图标到任务栏是灰色的,不让添加。
估计是前两天杀进程时 有的进程杀错了 反正现在电脑出现各种怪问题 看来需要重做系统了 郁闷
- 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
- 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
- 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
- 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
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 10.04上virtualbox装xp用建行的u盾成功了~!~
- Oracle 常用命令
- 软件设计师备考分析
- 用ejb3.0做的HelloWord!
- GDB 调试段错误问题
- Io 异常: The Network Adapter could not establish the connection 解决办法
- 2010年软件设计师考试注意事项
- ext 应用记录
- 高手看过来
- FTP:文件传输协议(指令及响应代码)
- 第五章 指针和动态内存
- VS2005移动设备安装包工程异常问题
- 多线程+socket+文件读写(面)
- ExtJs Store baseParams设置