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 -> the connection refused error

the connection refused error

From: ktsrikanth <ktsrikanth_at_hotmail.com>
Date: 17 Sep 2001 14:17:47 -0700
Message-ID: <bf616262.0109171317.123e0fce@posting.google.com>


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:17:47 CDT

Original text of this message

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