tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "云飞杨" <22687...@qq.com>
Subject tomcat jdbc pool stackoverflow error used with spring
Date Sun, 02 Dec 2012 08:56:20 GMT
Hi:

I'm evaluating jdbc pool after reading some blogs on  tomcatexpert.com. But when I try to
switch to jdbc pool from dbcp, I'm  getting stackoverflow error like this:

Caused by: java.lang.StackOverflowError
    at java.util.concurrent.AbstractExecutorService.<init>(AbstractExecutorService.java:71)
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1270)
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1163)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:117)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:86)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:180)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:86)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:180)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:86)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)

and I noticed that someone had the same issue before but not answered:
http://mail-archives.apache.org/mod_mbox/tomcat-users/201107.mbox/%3C32046311.post@talk.nabble.com%3E

my web app is a typical springmvc+hibernate application, and here is my applicationcontext
datasource part:

<bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close">
<property name="driverClassName" value="${telregistry.jdbc.driverClassName}" />
<property name="url" value="${telregistry.jdbc.url}"/>
<property name="username" value="${telregistry.jdbc.username}"/>
<property name="password" value="${telregistry.jdbc.password}"/>
<property name="initialSize" value="5"/>
<property name="initSQL" value="SELECT 1"/>
<property name="minIdle" value="5"/>
<property name="maxIdle" value="50"/>
<property name="maxActive" value="100"/>
<property name="maxWait" value="6000"/>
<property name="validationInterval" value="1800000"/>
<property name="validationQuery" value="SELECT 1"/>
</bean>

my system:
win7 32bit
jdk1.7.0_9(also test on jdk1.6.0_25)
mysql 5.5(also test oracle11g)
spring 3.1.0
jdbc pool(tomcat-jdbc-7.0.30.jar from official maven repo)

Also I test jdbc pool under tomcat7 as a container resource. It works. It seems that jdbc
pool cannot come along with spring.


Pls help me out.

thanks.


Yanky
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message