From issues-return-67568-archive-asf-public=cust-asf.ponee.io@commons.apache.org Thu May 3 20:16:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A3326180625 for ; Thu, 3 May 2018 20:16:03 +0200 (CEST) Received: (qmail 37184 invoked by uid 500); 3 May 2018 18:16:02 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 37173 invoked by uid 99); 3 May 2018 18:16:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2018 18:16:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3D127C1635 for ; Thu, 3 May 2018 18:16:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jIq6F1E7IopX for ; Thu, 3 May 2018 18:16:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 077385FBD3 for ; Thu, 3 May 2018 18:16:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4FAB8E0338 for ; Thu, 3 May 2018 18:16:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0F30321298 for ; Thu, 3 May 2018 18:16:00 +0000 (UTC) Date: Thu, 3 May 2018 18:16:00 +0000 (UTC) From: "Stefano Lissa (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DBUTILS-138) Exception in closing statement leave connections open MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Stefano Lissa created DBUTILS-138: ------------------------------------- Summary: Exception in closing statement leave connections open Key: DBUTILS-138 URL: https://issues.apache.org/jira/browse/DBUTILS-138 Project: Commons DbUtils Issue Type: Bug Affects Versions: 1.7 Environment: SQL Server 2012, Java 8, MS JDBC Driver 4. Reporter: Stefano Lissa On class QueryRunner starting at line 393 (see the snippet below) if the statement close attempt results in an exception, the connection is not closed correctly. I was not able to intercept the exception since it happens in a production environment with SQL Server 2012, Java 8 and original MS drivers, but the effect is the connection pool fills up and finally starts to log abandoned connections opened by QueryRunner. {noformat} } finally { try { close(rs); } finally { close(stmt); if (closeConn) { close(conn); } } }{noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)