commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tatiana Lloret Iglesias" <tllor...@gmail.com>
Subject StackOverflowError and DelegatingConnection.passivate
Date Tue, 19 Jun 2007 15:27:24 GMT
Hi all,
I'm getting this error from my dbcp classes,
any idea??

This is the way I initialize the Pool

*

connectionPool* = *new* GenericObjectPool(*null*);

Class.*forName*("com.mysql.jdbc.Driver", *true*,
DriverManagerConnectionFactory.*class*.getClassLoader());

ConnectionFactory connectionFactory = *new* DriverManagerConnectionFactory(
"jdbc:mysql://"+ip+":"+port+"/"+sid+"", usr,pwd);

PoolableConnectionFactory poolableConnectionFactory =
*new*PoolableConnectionFactory(connectionFactory,
*connectionPool*,*null*,*null*,*false*,*false*);

*dataSource* = *new* PoolingDataSource(*connectionPool*);
*

public* *void* returnConnection( Connection c ) {

*try* {

*connectionPool*.returnObject(c);

} *catch* (Exception e) {

// *TODO* Auto-generated catch block



e.printStackTrace();

}

}

*public* Connection getConnection() *throws* Exception {

String METODO = "getConnection";

*try* {

 *return*(*dataSource*.getConnection());

} *catch*( Exception e ) {

*throw*( *new* Exception(e.toString()) );

}

}


Regards
T

java.lang.StackOverflowError
 at java.util.ArrayList.toArray(Unknown Source)
 at org.apache.commons.dbcp.DelegatingConnection.passivate(
DelegatingConnection.java:374)
 at org.apache.commons.dbcp.DelegatingConnection.passivate(
DelegatingConnection.java:382)
 at org.apache.commons.dbcp.DelegatingConnection.passivate(
DelegatingConnection.java:382)
 at org.apache.commons.dbcp.DelegatingConnection.passivate(
DelegatingConnection.java:382)
 at org.apache.commons.dbcp.DelegatingConnection.passivate.... etc etc
etc...

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message