DriverManager.getConnection: E/S Exception
843854Mar 30 2004 — edited Mar 31 2004Hello,
I am new to JDBC and I do hope you can help me.
I am only trying to connect to an ORACLE database but I get "E/S Exception: Connection refused"
I am doing the following:
try
{
String JdbcDriver= "oracle.jdbc.driver.OracleDriver";
Class.forName(JdbcDriver).newInstance();
}
catch(Exception ex)
{
System.out.println("Can't find the driver");
}
try
{
System.out.println("Trying to connect...");
String JdbcURL=""jdbc:oracle:thin:aaa/aaa123@172.16.20.150:1521:siu";
conn=DriverManager.getConnection(JdbcURL);
connected=true;
}
catch (Exception e)
{
connected=false;
exceptionMessage="SQL exception: "+e.getMessage();
System.out.println("essage="+e.getMessage());
}
When executing the getConnection method, I get the following exception:
Connection refused(DESCRIPTION=(TMP=)(V
SNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Anyone can help me?
Thank you in advance.