[logback-dev] [JIRA] Commented: (LBCLASSIC-282) DBAppender: Connection obtained was never closed

Jon Osborn (JIRA) noreply-jira at qos.ch
Wed Oct 12 16:46:13 CEST 2011

    [ http://jira.qos.ch/browse/LBCLASSIC-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12204#action_12204 ] 

Jon Osborn commented on LBCLASSIC-282:

Actually, I think all of the DB related code needs a look. There are many places where either the connection is not closed OR the SQL is not implemented in a try{}catch{}finally{} statement to make sure the DB connection is returned to the database.

> DBAppender: Connection obtained was never closed
> ------------------------------------------------
>                 Key: LBCLASSIC-282
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-282
>             Project: logback-classic
>          Issue Type: Bug
>          Components: appender
>    Affects Versions: 0.9.29
>         Environment: Windows 7, Java 6, Spring 3.1 Snapshot, slf4j 1.6.1, logback 0.9.29, bonecp 0.7.1
>            Reporter: Ralph Schaer
>            Assignee: Logback dev list
>            Priority: Minor
> I use BoneCP together with logback. BoneCP complains about a connection that is never closed in the DBAppender
> The problem is in the method discoverConnnectionProperties in ConnectionSourceBase. This method does not close the database connection
> 19:48:56.896 [BoneCP-connection-watch-thread] ERROR com.jolbox.bonecp.CloseThreadMonitor - Connection obtained from thread [Thread-4] was never closed. 
> Stack trace of location where connection was obtained follows:
>  java.lang.Thread.getStackTrace(Thread.java:1479)
>  com.jolbox.bonecp.BoneCP.captureStackTrace(BoneCP.java:543)
>  com.jolbox.bonecp.BoneCP.watchConnection(BoneCP.java:532)
>  com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:518)
>  com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:114)
>  ch.qos.logback.core.db.DataSourceConnectionSource.getConnection(DataSourceConnectionSource.java:72)
>  ch.qos.logback.core.db.ConnectionSourceBase.discoverConnnectionProperties(ConnectionSourceBase.java:47)
>  ch.qos.logback.core.db.DataSourceConnectionSource.start(DataSourceConnectionSource.java:52)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list