Operating System - HP-UX
1833883 Members
1786 Online
110063 Solutions
New Discussion

JDBC connection (broken pipe)

 
KO kwang tae
Advisor

JDBC connection (broken pipe)

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 1
Yogeeraj_1
Honored Contributor

Re: JDBC connection (broken pipe)

hi,

is this a duplicate post?

see:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xfb7038dfa974d711abdc0090277a778c,00.html

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