This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Oracle JDBC Connectivity problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle JDBC Connectivity problem" Watch "Oracle JDBC Connectivity problem" New topic
Author

Oracle JDBC Connectivity problem

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi.
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,
Rubesh.
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Look at my post here
Hope this helps,
Sandeep


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Oracle JDBC Connectivity problem
 
Similar Threads
Datasource Connection problem with ejb+Jboss 4.0.5+ IntelliJ 8
Newbie: How doy I connect to Oracle Using JDBC
Problem connecting to database
IOException while trying to connect to DB
datasource connection in admin console unsuccessful