This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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. Class.forName("oracle.jdbc.driver.OracleDriver"); return DriverManager.getConnection ("jdbc racle:thin:@127.0.0.1:1521 rcl", "scott", "tiger"); But if the same code(changing the ip to oracle server's id, so the code would be return DriverManager.getConnection ("jdbc racle:thin:@192.168.27.32:1521 rcl", "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. Thanks
Each machine needs the Oracle client installed on it. Then you put your server information into your tnsnames.ora file. Then everyone will be able to access the Oracle server. You can ask your DBA for help on this. Mark
Thanks everyone for replying. No I don't have a firewall installed. Is installing the Oracle clients the only way, can't it be done without that? If i do install Oracle client what else needs to be done after that?
SJ Adnams
Ranch Hand
Joined: Sep 28, 2001
Posts: 925
posted
0
make sure you can ping the boxes (i.e. check subnet masks), check the listener is running, check with sqlplus.. you dont need sqlnet (i.e. oracle client) or tnsnames.ora installed & setup to use the thin driver (just the classes12.zip) like you are doing. maybe have a look at the 'ask tom' website for more ideas.
"you dont need sqlnet (i.e. oracle client) or tnsnames.ora installed & setup to use the thin driver (just the classes12.zip) like you are doing." That is true. I forget that that is the wonder of the thin driver, in that you don't need to install the client on the clients. SJ has very good suggestions. Here is the link to Ask Tom. Mark
Brahim Bakayoko
Ranch Hand
Joined: Aug 29, 2003
Posts: 155
posted
0
Originally posted by Angela lewis: Thanks everyone for replying. No I don't have a firewall installed. Is installing the Oracle clients the only way, can't it be done without that? If i do install Oracle client what else needs to be done after that?
You don't have to install any oracle client as you are using only jdbc. Make sure the remote machine is accessible. Did you ping?
SCJP, SCWCD, SCBCD, IBM CSD WebSphere v5, <br />A+, MCP 2000 and 2000 server, CST, and few incompleted certification tracks.<br /> <br />Ivory Coast<br /> <br />Analyze your web Request/Response @ <a href="http://webtools.servehttp.com" target="_blank" rel="nofollow">http://webtools.servehttp.com</a> down for a while...
Angela lewis
Ranch Hand
Joined: Mar 01, 2004
Posts: 100
posted
0
Did u Ping
Yes i did ping and it pings fine.
SJ Adnams
Ranch Hand
Joined: Sep 28, 2001
Posts: 925
posted
0
do a "netstat -a" & make sure oracle is listening on port 1521 do you have some sort of personal firewall running?
Angela lewis
Ranch Hand
Joined: Mar 01, 2004
Posts: 100
posted
0
do a "netstat -a" & make sure oracle is listening on port 1521
I did netstat -a and oracle is listeneing on port 1521
do you have some sort of personal firewall running?
No i have no firewall running
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.