Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=1250


Web tier: servlets, JSP, Web frameworks: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=1250

  1. The following exception occurred when trying to get a connection from Oracle using thin driver. But,I could able to get the Connection through jdbc-odbc. But not with thin driver.

    source code snippet:
    public Connection getConnection() throws SQLException, ClassNotFoundException {

    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@oracle8i_installed_server_ipaddress:1521:servicename" , "msudev", "msudev");
    System.out.println("Con: " + con);
    return con;


    Exception stack trace:

    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

    at oracle.jdbc.dbaccess.DBError.throwSqlException(

    at oracle.jdbc.dbaccess.DBError.throwSqlException(

    at oracle.jdbc.driver.OracleConnection.<init>(

    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(

    at oracle.jdbc.driver.OracleDriver.connect(

    at java.sql.DriverManager.getConnection(

    at java.sql.DriverManager.getConnection(

    at com.sierra.msu.util.ConnectionPool.getConnection(

    at com.sierra.msu.util.ConnectionPool.main(

    Could anyone help in solving this problem.
    Awaiting your response.
    Thx in advance,
  2. Connection con = DriverManager.getConnection("jdbc:oracle:thin:@oracle8i_installed_server_ipaddress:1521:servicename" , "msudev", "msudev");

    servicename - must be the SID of the database; most often ORCL; try it!

    from oracle:
    TNS-12505 TNS:listener could not resolve SID given in connect descriptor

    Cause: The SID in CONNECT_DATA was not found in the listener's tables.

    Action: Check to make sure that the SID specified is correct. The SIDs that are currently registered with the listener can be obtained by typing "LSNRCTL SERVICES listener_name". These SIDs correspond to SID_NAMEs in TNSNAMES.ORA, or DB_NAMES in the INIT.ORA file.