Hello,
I am quite new to JDBC and Oracle so please be patient with me.
I am trying to connect to an Oracle Database but I get an Exception: COnnection Refused
Here is what I am doing:
....
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/
[email protected]: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=(CO DE=12505)(EMFI=4))))
Anyone can help me or at least give me a hint about where to look?
Thank you in advance.