]
Chris Bredesen commented on HHH-2694:
-------------------------------------
What version did you see the issue resurface on? Best I can tell, 3.3.1 is the only
version released with this fix.
create-drop with c3p0 causes SQLException
-----------------------------------------
Key: HHH-2694
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2694
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.2.4.sp1
Environment: hibernate-entitymanager 3.2.1.ga, c3p0 0.9.0, and postgreSQL 8.1.8
or hsqldb 1.8.7
Reporter: Chris Redekop
Assignee: Chris Bredesen
Fix For: 3.2.x, 3.3.1, 3.4
Attachments: c3p0Test.tar.gz
In the attached test application, an EntityManagerFactory is created and then closed.
Closing the EMF causes line 801 of org.hibernate.impl.SessionFactoryImpl to call
getConnectionProvider().close(), which eventually results in c3p0's PooledDataSource
being closed.
Line 808 of org.hibernate.impl.SessionFactoryImpl the calls schemaExport.drop(), which
attempts to acquire a connection from the data source and causes the following
SQLException.
java.sql.SQLException: com.mchange.v2.c3p0.PoolBackedDataSource@fced4 [
connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@9505f [
acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000,
autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure
-> false, checkoutTimeout -> 0, connectionTesterClassName ->
com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null,
forceIgnoreUnresolvedTransactions -> false, identityToken -> 9505f,
idleConnectionTestPeriod -> 100, initialPoolSize -> 10, maxIdleTime -> 100,
maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0,
minPoolSize -> 10, nestedDataSource ->
com.mchange.v2.c3p0.DriverManagerDataSource@80cac9 [ description -> null, driverClass
-> null, factoryClassLocation -> null, identityToken -> 80cac9, jdbcUrl ->
jdbc:hsqldb:., properties -> {user=******, password=******, autocommit=true,
release_mode=auto} ], preferredTestQuery -> null, propertyCycle -> 300,
testConnectionOnCheckin -> false, testConnectionOnCheckout -> false,
usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null,
identityToken -> fced4, numHelperThreads -> 3 ] has been closed() -- you can no
longer use it.
This exception is swallowed so it does not cause a test error, but it does appear in the
console output.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: