jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Oracle JDBC Connectivity problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle JDBC Connectivity problem" Watch "Oracle JDBC Connectivity problem" New topic

Oracle JDBC Connectivity problem

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am having trouble connecting to Oracle database driver from a WinNT server.
The error returned is "IO Exception: The Network Adapter could not establish the connection"
The scenario is, the Oracle database server is running on some X machine, which is running and other apps are sending and receiving data from that. I have written a java application that uses Thin JDBC driver for Oracle. I developed it on my pc which is WinNT workstation. The application is able to make the connection to the Database and do all the data retrieval. I took the same code to a WinNT Server which has the same JDBC driver for Oracle. It's not able to connect to the database. The exception that is thrown is "IO Exception: The Network Adapter could not establish the connection"
I searched about it on the forums. But all i could get is check the port/host da da da... I have hardcoded the settins about DB Connectivity and since that works on my PC, i presume that it should work on any machine, provided the java app has access to the JDBC Classes. I have set the classpath to include the drivers. Is there anything that i am missing???
Things that i have already tried
1) Classpath is proper
2) Tried with hostname as well as IP address
3) DB engine and listeners are up and running( I can connect from my pc to DB using the same java application)
4) Port address is correct
5) Network is working fine
6) Using the correct version of JDBC driver(classes12.jar)
The problem is occuring only from that NT Server machine. Same code works fine from WinNT workstation and Win98 PCs.
What could be the problem?
Help would be appreciated.
Thanx and regards,
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Look at my post here
Hope this helps,
I agree. Here's the link: http://aspose.com/file-tools
subject: Oracle JDBC Connectivity problem
It's not a secret anymore!