日期:2014-05-17  浏览次数:21162 次

连接Oracle Io 异常: The Network Adapter could not establish the connection
数据库 oracle 10g
驱动 class12.jar
能进sqlplus 用户名 密码 url都对,就是跑这个异常 帮忙看下

------解决方案--------------------
使用net configuration assistant建立连接串,测试通过后,conn 用户名/密码@连接串;
------解决方案--------------------
String DBURL = "jdbc:oracle:thin:@localhost:1521:myoracle" ;

这里一定要用你的是计算机的名称:test

String DBURL = "jdbc:oracle:thin:@test:1521:myoracle" ;


不行的话,再看一下:
http://www.crazycoder.cn/Java/Article20427.html

http://tech.ccidnet.com/art/3737/20030726/466895_1.html



探讨
不会,可能是安装那里没配好,用老师安装虚拟机里的oracle就能连接上,相同的代码

------解决方案--------------------
在上叙错误排除的情况下,去服务里 看监听进程是否打开。或者cmd->lsnrctl->start手动打开。
------解决方案--------------------
你检测一下tnsnames.ora文件里面,各项参数是否配置正确?

------解决方案--------------------
Io 异常: The Network Adapter could not establish the connection 



http://www.diybl.com/course/3_program/java/javashl/20071126/87790.html