cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC connection error..

KO kwang tae
Advisor

JDBC connection error..

i need help..
when i tested the below source, there was the following error.(broken pipe)

is there a person who knows about this problem..?

thanks in advance..


373-th connected
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092608)
(ERR=12500)(ERROR_STACK=(ERROR=(CODE=12500)(EMFI=4))(ERROR=(CODE=12547)(EMFI=4))
(ERROR=(CODE=12560)(EMFI=4))(ERROR=(CODE=517)(EMFI=4))(ERROR=(BUF='HPUX Error: 32: Broken pipe'))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:184)



-----connect test source------

/* JDBC
java.sql.Connection(the number of process of ORACLE init.ora) */
import java.util.*;
import java.sql.*;
public class DbMaxConnTest
{
public static int MAX=10000;
public static void main(String[] args)
throws Exception
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Vector conns = new Vector();
try
{
for(int i=0 ; i< MAX; i++) {
Connection conn = DriverManager.getConnection(
"jdbc:oracle:thin:@server:1531:ORACLE_SID", "user", "*****");
conns.addElement(conn);
System.out.println((i+1) + "-th connected");
}
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
Enumeration enum = conns.elements();
while(enum.hasMoreElements())
{
Connection conn = (Connection)enum.nextElement();
try { conn.close();}catch(Exception e){}
}
}
}
}

1 REPLY
Yogeeraj_1
Honored Contributor

Re: JDBC connection error..

hi,

could be numerous causes.

can you try the instructions found in the attached metalink note (94091.1) and update us.

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)