[
https://issues.apache.org/jira/browse/DBCP-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107280#comment-13107280
]
Phil Steitz commented on DBCP-365:
----------------------------------
I can't reproduce this using the build 901 postgres 9.1 jdbc driver. What
driver, exactly are you using, what JDK and what versions of commons pool and
DBCP? If you are using DBCP 1.4, you should be using the JDBC 4 driver and JDK
1.6+
> StackOverflowError SharedPoolDataSource.getPooledConnectionAndInfo()
> Postgresql
> -------------------------------------------------------------------------------
>
> Key: DBCP-365
> URL: https://issues.apache.org/jira/browse/DBCP-365
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: Windows XP 64-bit multi-threaded
> Reporter: Axl
> Labels: JDBC, postgresql
>
> This might be a problem with the JDBC driver for PostgreSQL 9.1 but it also
> shows up here. Since this is a StackOverflowError there isn't much
> information about what specifically is causing this. I'm guessing it's a
> Class.forName() for one of the org.postgresql.* classes but not sure which
> one. The Class.forName() goes into a loop which throws the StackOverflowError.
> SharedPoolDataSource.getPooledConnectionAndInfo(String, String) line: 174
> SharedPoolDataSource(InstanceKeyDataSource).getConnection(String, String)
> line: 701
> SharedPoolDataSource(InstanceKeyDataSource).getConnection() line: 676
> spds = new
> org.apache.commons.dbcp.datasources.SharedPoolDataSource();
> cpds = new
> org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS();
> cpds.setDriver("org.postgresql.Driver");
>
> cpds.setUrl("jdbc:postgresql://localhost:1234/mydatabasename");
> cpds.setUser("myuser");
> cpds.setPassword("mypass");
> spds.setConnectionPoolDataSource(cpds);
> spds.setMaxActive(30);
> spds.setMaxWait(50);
>
> conn = spds.getConnection();
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira