my code below.
java.sql.drivermanager.registerdriver(new oracle.jdbc.driver.oracledriver()); java.sql.connection con=drivermanager.getconnection("jdbc:oracle:thin:@localhost:1521:xe", "ims", "_ims"); the exception occurs @ second line given below.
java.sql.sqlexception: listener refused connection following error: ora-12505, tns:listener not know of sid given in connect descriptor connection descriptor used client was: localhost:1521:xe" what exception means? whats wrong in code?
edit girish
the listener.ora file :
sid_list_listener = (sid_list = (sid_desc = (sid_name = plsextproc) (oracle_home = c:\oraclexe\app\oracle\product\10.2.0\server) (program = extproc) ) (sid_desc = (sid_name = clrextproc) (oracle_home = c:\oraclexe\app\oracle\product\10.2.0\server) (program = extproc) ) ) listener = (description_list = (description = (address = (protocol = ipc)(key = extproc_for_xe)) (address = (protocol = tcp)(host = girish-pc)(port = 1521)) ) ) default_service_listener = (xe) the tnsnames.ora file :
xe = (description = (address = (protocol = tcp)(host = girish-pc)(port = 1521)) (connect_data = (server = dedicated) (service_name = xe) ) ) extproc_connection_data = (description = (address_list = (address = (protocol = ipc)(key = extproc_for_xe)) ) (connect_data = (sid = plsextproc) (presentation = ro) ) ) oraclr_connection_data = (description = (address_list = (address = (protocol = ipc)(key = extproc_for_xe)) ) (connect_data = (sid = clrextproc) (presentation = ro) ) ) in above, both tnsnames.ora , listener.ora file's contents given.
i've replaced oracle**.jar new one, n work. think there problem old oracle**.jar. support.
Comments
Post a Comment