我用的是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
你试试可以吗
反而没提示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没错了,还是会出现同样的错误:无法分发客户端连接