[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2447) Connection leak if logAndClearWarnings throws

Strong Liu (JIRA) noreply at atlassian.com
Fri Nov 25 10:42:19 EST 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Strong Liu resolved HHH-2447.
-----------------------------

    Resolution: Out of Date
      Assignee: Strong Liu

I believe this is not a bug anymore in hibernate 4.0

> Connection leak if logAndClearWarnings throws 
> ----------------------------------------------
>
>                 Key: HHH-2447
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2447
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.3, 3.2.2
>         Environment: Database product name : DB2/NT
> Database product version : SQL08025
> JDBC driver name  : IBM DB2 JDBC Universal Driver Architecture
> Hibernate 3.1.3 (seems to exist in 3.2.2 as well)
> JDBC driver version  : 2.9.31
>            Reporter: Jeppe N. Madsen
>            Assignee: Strong Liu
>            Priority: Minor
>
> In ConnectionManager.closeConnection, logAndClearWarnings is called before connection.close() is called. If this call throws an exception, the connection is never closed. 
> We have observed that DB2 sometimes throws an Error because the SQLWarning chain is wrong:
> [14-02-07 11:36:30:889 CET] 10b0b533 WebGroup      E SRVE0026E: [Servlet Error]-[SQLWarning chain holds value that is not a SQLWarning]: java.lang.Error: SQLWarning chain holds value that is not a SQLWarning
> 	at java.sql.SQLWarning.getNextWarning(SQLWarning.java:109)
> 	at org.hibernate.util.JDBCExceptionReporter.logWarnings(JDBCExceptionReporter.java:50)
> 	at org.hibernate.util.JDBCExceptionReporter.logWarnings(JDBCExceptionReporter.java:33)
> 	at org.hibernate.util.JDBCExceptionReporter.logAndClearWarnings(JDBCExceptionReporter.java:22)
> 	at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:443)
> 	at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:379)
> 	at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:318)
> 	at org.hibernate.impl.SessionImpl.close(SessionImpl.java:293)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list