我用的是oracle 10g,主机名为john,监听接口为1521.数据库名为oracletest,
sid为orcl
java代码:
String url = "jdbc:oracle:thin:john:1521:orcl";
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(url, "sysman", "123");
帮我看看有没有写错?错误: Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
The Connection descriptor used by the client was:
localhost:1521:orcl
sid为orcl
java代码:
String url = "jdbc:oracle:thin:john:1521:orcl";
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(url, "sysman", "123");
帮我看看有没有写错?错误: Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
The Connection descriptor used by the client was:
localhost:1521:orcl
解决方案 »
- 求 java 组合框(JComboBox)实现“自动完成”功能的代码实例(就是在组合框中输入前几个字母,在下拉菜单自动搜寻匹配项目并只显示这些匹配的)
- ant编译某个类,里面import里一下类,路径找不到
- ResultSet问题,大家帮忙看下
- 怎么把bufferedimage转成 gif文件,用JAI(Java Advanced Imaging API)
- 如如何选取分钟是1的所有数据
- 求问一个调用外部可执行文件的函数
- 人性到哪里去啦?
- 再请教个I/O的小问题,谢谢。
- 想開始搞java高手們推薦些好書
- java编程JPanel上加JPanel,为什么设了null布局之后什么都不显示
- java网络开发中的自定义协议数据流问题。
- 急!!!请大家帮帮忙!
你试试可以吗
反而没提示url无效
用String url = "jdbc:oracle:thin:@john:1521:orcl";
错误是:
Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
The Connection descriptor used by the client was:
john:1521:orcl
貌似url没错了,还是会出现同样的错误:无法分发客户端连接