posted 15 years ago
Hi all,
I am getting the following exception while connecting to databse.
1. driver is loaded
2. Database server is running
what can be the problem. i gave ip address instead of machine name in place of URL
the code is:
Class.forName("oracle.jdbc.driver.OracleDriver");//works fine
System.out.println("Oracle driver loaded: ");
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@mats:1521:ORCL", "system", "orcl");
System.out.println("Connecting to oracle database: ");
The Exception is:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection