File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Oracle8 Personal Edition and jdbc URL 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 "Oracle8 Personal Edition and jdbc URL" Watch "Oracle8 Personal Edition and jdbc URL" New topic

Oracle8 Personal Edition and jdbc URL

Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I've installed Oracle 8 Personal edition in my NT box and created an instance called MDM. Now I am trying to write a simple JDBC code to connect to the database. I don't know the port number that I supposed to specify in

I tried "1521" for the port and I get the exception:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
I like to know how to find the port number that Oracle service is lisening? or Is there any other way to make connection with out the port number? Thanks a million
PS: Ignore the apostrophe in front of the word Oracle
[ October 17, 2002: Message edited by: Sai Prasad ]
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
have u created any listener for ur database?
unless u havenot changed the port number of oracle it is 1521.
if u are not developing on an intranet "locathost" can be used as the host name.
also to check wheter you have installed ur oracle correctly try to log onto SQLPLUS using user name/password and databse
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Hello Prabhat,
Thanks for the reply. I can logon to the database from the command line using the command:
"sqlplus sprasad/sprasad". I get connected to the MDM instance because that is the only instance running in my machine.
I am not able to specify any instance name like
"sqlplus sprasad/sprasad@MDM"
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I solved it. I was supposed to create a TNS listener using the Net8Configuration assistant for the port 1521. Now everything works great! Thanks.
I agree. Here's the link:
subject: Oracle8 Personal Edition and jdbc URL
Similar Threads
jdbc access to DB2
JDBC Connect problem
SQLException: No Listener
Network Adapter Error WHY????