[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2694) create-drop with c3p0 causes SQLException

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Jun 28 09:10:52 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27337 ] 

Emmanuel Bernard commented on HHH-2694:
---------------------------------------

Seems like a race condition on shutdown.

> create-drop with c3p0 causes SQLException
> -----------------------------------------
>
>                 Key: HHH-2694
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2694
>             Project: Hibernate3
>          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
>         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 at fced4 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource at 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 at 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the hibernate-issues mailing list