[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30755 ]
Stephen Pickett commented on HHH-2694:
--------------------------------------
Hello, first of all I'm new here so I apologise in advance if I doing/say anything stupid :) Secondly, I'm getting the same error when closing the factory whether or not I use hbm2ddl (I used create, rather than create-drop). Have commented out my close factory part of code and it removes the problem. Whilst it's not essential that I close it, I'd rather do so.
> 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
> Assignee: Chris Bredesen
> 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@(protected)!
stQuery -> 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
_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues