Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle JDBC Thin 8.0.4 and "Connection Refused"

Re: Oracle JDBC Thin 8.0.4 and "Connection Refused"

From: Colm Hoban <colm.hoban_at_respironics.com>
Date: 1998/10/05
Message-ID: <3618AC51.2E62@respironics.com>#1/1

steve hendrikse wrote:
>
> Good Day,
>
> I am using the Oracle JDBC thin driver slightly different than normal. I
> use them in the context of a "page-compiled" web-page on Sun's
> JavaWebServer1.1
>
> The Oracle 8.0.4 server sits on an NT machine. The WebServer sits on
> another.
>
> the following code gets a "Connection refused" error, and i am not sure
> whether the problem is in the database server, the JDBC stuff, or the web
> page. the documentation from the JDBC drivers is a bit sketchy.
>
> Anyways, any help is very much appreciated.
>
> code:
>
> out.println("start<br>");
> try
> {
> Class.forName ("oracle.jdbc.driver.OracleDriver");
> }
> catch (java.lang.ClassNotFoundException e)
> {
> out.println("<p> (first part) error: -> " + e + " <- (Driver not
> found)<p>");
> return;
> }
> out.println("<i> second </i><br>");
> try
> {
> DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
> Connection con =
> DriverManager.getConnection("jdbc:oracle:thin:@exchange:1521:ORCL", "sys",
> "change_on_install");
> DatabaseMetaData dma = con.getMetaData ();
> out.println("Connected to: " + dma.getURL() + "<br>");
> out.println("Driver: " + dma.getDriverName() + "<br>");
> out.println("Version: " + dma.getDriverVersion() + "<br>");
> }
> catch( SQLException e )
> {
> out.println("<p> (second part) error: -> " + e + " <- exiting<p>");
> }
>
> the code doesn't really do anything except print out some info about the
> driver.
>
> the output:
>
> start
> second
> (second part) error: -> java.sql.SQLException: Connection refused <-
> exiting
> end
>
> thanks in advance,
> steve

I thought one of the limitations was that the webserver and db had to reside on the same box? Received on Mon Oct 05 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US