[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] [Commented] (DBCP-431) SQLException: Error preloading the connection pool after upgrade to co
From:       "Phil Steitz (JIRA)" <jira () apache ! org>
Date:       2015-01-30 13:27:34
Message-ID: JIRA.12770298.1422349000000.214998.1422624454681 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/DBCP-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298615#comment-14298615 \
] 

Phil Steitz commented on DBCP-431:
----------------------------------

Sequence above is not possible because close is synchronized and thread 1 \
createDataSource performs initialization in sync(this) block.

> SQLException: Error preloading the connection pool after upgrade to commons-dbcp2
> ---------------------------------------------------------------------------------
> 
> Key: DBCP-431
> URL: https://issues.apache.org/jira/browse/DBCP-431
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: Windows XP
> Junit 4.11
> Java 1.7
> Spring 4.0
> maven-compiler-plugin 3.2
> maven.surefire.plugin 2.17
> maven-cobertura-plugin 2.6
> Jenkins 1.549
> Reporter: Sergio Cuenca
> Priority: Minor
> Labels: commons-dbcp2, connection-pooling
> Fix For: 2.0, 2.0.1
> 
> 
> Hi all,
> We have a continuous integration environment (Jenkins) to launch our JUnits tests.
> We had the version 1.4 of commons-dbcp to create the connection pools with Spring. \
> The configuration was the following: {code:xml}
> <bean id="dataSourceTemplate" class="org.apache.commons.dbcp.BasicDataSource" \
> destroy-method="close">  <property \
> name="driverClassName"><value>${aplicacion.datasource.driverClassName}</value></property>
>   <property name="url"><value>${aplicacion.datasource.url}</value></property>
> 	  <property name="username"><value>${aplicacion.datasource.user}</value></property>
>   <property name="password"><value>${aplicacion.datasource.password}</value></property>
>   <property name="initialSize"><value>1</value></property>
> 	  <property name="maxActive"><value>15</value></property>
> 	  <property name="maxIdle"><value>2</value></property>
> 	  <property name="accessToUnderlyingConnectionAllowed"><value>${aplicacion.datasource.accessToUnderlyingConnectionAllowed}</value></property>
>   </bean>
> {code}
> We use JUnit 4.11 and maven cobertura plugin 1.6. to launch the tests.
> This configuration was working CORRECTLY.
> After upgrade to commons-dbcp2, version 2.0.1. Some unit tests are reporting errors \
>                 with the following message:
> java.sql.SQLException: Error preloading the connection pool.
> We launch one unit test each time, one by one. We create and destroy the connection \
> pool every time. What can we do to solve this problem?? 
> Thank you very much.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic