Accessing oracle from remote machine
Posted on 2004-04-30
I am running a JSP application on Tomcat Server with oracle 8i as database.
Oracle server is maintained on a seperate machine and all the developers access the same Oracle server for developing while they have tomcat installed seperately on their respective machines.
If i install tomcat on the machine in which oracle is installed and try to access oracle using the following code in my JSP, it works perfectly fine.
return DriverManager.getConnection ("jdbc:oracle:thin:@127.0.0.1:1521:orcl", "scott", "tiger");
But if the same code(changing the ip to oracle server's id, so the code would be
return DriverManager.getConnection ("jdbc:oracle:thin:@192.168.27.32:1521:orcl", "scott", "tiger");
), is used by a developer in his JSP using his local tomcat server and trying to access the orace server, she gets the following error.
java.sql.SQLException:Io Exception: The Network adapter could not establish a connection.
What we want to acheive is that although every developer has a web server seperately on her machine, the oracle server should be installed on only one machine and each developer should access that for developing her JSP application.