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 -> Oracle JDBC Thin 8.0.4 and "Connection Refused"

Oracle JDBC Thin 8.0.4 and "Connection Refused"

From: steve hendrikse <shend_at_sar-net.com>
Date: 1998/10/01
Message-ID: <6uuvko$j7q$1@zeke.ebtech.net>#1/1

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 Received on Thu Oct 01 1998 - 00:00:00 CDT

Original text of this message

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