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

Home -> Community -> Usenet -> c.d.o.server -> Re: the connection refused error

Re: the connection refused error

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Mon, 17 Sep 2001 21:36:28 GMT
Message-ID: <3BA66CDC.B1BA055@rationalconcepts.com>


Hi,

  1. Does Username have an oracle account? Is the Password correct for Username. Suggestion: put a System.out.println for Username and Password right before you ask for the connection.
  2. The thin driver does not reference tnsnames.ora.
  3. Double check your listener.ora for an entry DEVTEST using TCPIP and listening on port 1521.
  4. Remove either classes12.zip or classes111.zip from your servlet engine's classpath. If you are writing jdk1.2 code you should be using the classes12.zip driver.
  5. Write a little connection application and test outside of the servlet engine...might make debuggin easier.

hth,
cindy

ktsrikanth wrote:

> Hi
> i ma trying to connect to the oracle database using the following
> code. i get the following error.
>
> java.sql.SQLException: Io exception: Connection
> refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
>
> i have the tnsnames.ora being configured and i am able to connect to
> the database using sqlplus and 0racle net8 easy config. i am using
> weblogic as the servlet engine. i ahve the classes111.zip and
> classes12.zip added to the weblogic classpath as well as to the NT
> classpath(though i think that the NT classpath has nothing to do with
> this).
> Please help me. Thank you
>
> The code is as follows.
> The username and the password are defined in the declaration part.
>
> try
> {
> driver=(Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
> Conn = DriverManager.getConnection
> ("jdbc:oracle:thin:@10.161.36.217:1521:DEVTEST",Username,
> Password);
> }
> catch(Exception connexec)
> {
> out.println("connectionError....."+connexec+"<br>");
> }
>
> try
> {
> String sql="select billing_cde from billing";
> stmt=Conn.prepareStatement(sql);
> rset=stmt.executeQuery(sql);
> while(rset.next())
> {
> out.println(rset.getString("billing_cde"));
> }
> }
> catch(Exception rsetexec)
> {
> out.println("resultset error....."+rsetexec+"<br>");
> }
Received on Mon Sep 17 2001 - 16:36:28 CDT

Original text of this message

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