Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / February 2004

Tip: Looking for answers? Try searching our database.

The Network Adapter could not establish the connection

Thread view: 
kaeli - 24 Feb 2004 16:00 GMT
Hi all,

I copied some code from one (unix solaris) machine to another and am now
getting the following error:

The Network Adapter could not establish the connection

The exact same code works fine on the original machine, so the DB is up,
listeners are up, etc.
I am missing one vital thing - there is no Oracle installed on the new
machine. I just moved the classes111.zip file. I did not install Oracle.
I don't think I should have to, but obviously, I'm missing something I
need to connect.
(there is no tnsnames.ora, etc)

This fails on the new machine.
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();                                                    
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());                                              
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:url:port:instance", "username", "password");                                                                                                                      

Any ideas what I need to do to get a connection to a DB without having
to install oracle on the machine?

TIA

Signature

--
~kaeli~
She was engaged to a boyfriend with a wooden leg but broke
it off.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Joe Weinstein - 24 Feb 2004 17:10 GMT
> Hi all,
>
[quoted text clipped - 16 lines]
> Connection conn = DriverManager.getConnection
> ("jdbc:oracle:thin:url:port:instance", "username", "password");

Check your URL. The one you print above seems broken.
It should be something like: "jdbc:oracle:thin:DBMSMACHINE:PORTNUMBER:SID

Joe Weinstein at BEA

> Any ideas what I need to do to get a connection to a DB without having
> to install oracle on the machine?
>
> TIA
kaeli - 24 Feb 2004 18:41 GMT
> Hi all,
>
> I copied some code from one (unix solaris) machine to another and am now
> getting the following error:
>
> The Network Adapter could not establish the connection

Solved.

Solution: Had to add DNS entry for Oracle host machine to host files on
new machine. New machine was missing that entry.

Oops.  :)

Signature

--
~kaeli~
Who is General Failure and why is he reading my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Richard Wheeldon - 27 Feb 2004 00:00 GMT
> Any ideas what I need to do to get a connection to a DB without having
> to install oracle on the machine?

I'm having similar problems here. Which version of oracle are
you trying to connect to ?

Richard
kaeli - 27 Feb 2004 14:22 GMT
> > Any ideas what I need to do to get a connection to a DB without having
> > to install oracle on the machine?
[quoted text clipped - 3 lines]
>
> Richard

I solved this problem. The machine I was on didn't "know" the machine
Oracle was on by it's name. Adding an entry to one of the config files
for the machine fixed it.
It was Oracle 8i.

Signature

--
~kaeli~
Contrary to popular opinion, the plural of 'anecdote' is
not 'fact'.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.