Hi , I have installed Oracle 10g in window 7 os. While executing my JDBC program I am getting below problem. Im using this URL jdbc:oracle:thin:@localhost:1521:XE . I tried with
jdbc:oracle:thin:@localhost:1521/XE then also it is not working .
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
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:454)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:802)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.jlcindia.jdbc.JDBCUtils.getOracleConnection(JDBCUtils.java:18)
at com.jlcindia.jdbc.Lab4.main(Lab4.java:10)