日期:2014-05-16 浏览次数:20559 次
连接 jdbc?Oracle10g?错误?,JDBC代码无问题,服务也启动,连接字符串也是对的,但是在eclipse?下报错,错误信息如下:
java.sql.SQLException:?Listener?refused?the?connection?with?the?following?error:
ORA-12505,?TNS:listener?does?not?currently?know?of?SID?given?in?connect?descriptor
The?Connection?descriptor?used?by?the?client?was:
localhost:1521:orcl
at?oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at?oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:279)
at?oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:318)
at?oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:343)
at?oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:147)
at?oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:31)