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

Discussions

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 {

    Class.forName("oracle.jdbc.driver.OracleDriver");
    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(DBError.java)

    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)

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

    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)

    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)

    at java.sql.DriverManager.getConnection(DriverManager.java:517)

    at java.sql.DriverManager.getConnection(DriverManager.java:177)

    at com.sierra.msu.util.ConnectionPool.getConnection(ConnectionPool.java:190)

    at com.sierra.msu.util.ConnectionPool.main(ConnectionPool.java:161)

    Could anyone help in solving this problem.
    Awaiting your response.
    Thx in advance,
    Usha.
  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.