Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DriverManager.getConnection: E/S Exception

843854Mar 30 2004 — edited Mar 31 2004
Hello,
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2004
Added on Mar 30 2004
16 comments
425 views