Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 267BAD4C6 for ; Thu, 15 Nov 2012 18:38:53 +0000 (UTC) Received: (qmail 50341 invoked by uid 500); 15 Nov 2012 18:38:52 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 50258 invoked by uid 500); 15 Nov 2012 18:38:51 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 50245 invoked by uid 99); 15 Nov 2012 18:38:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 18:38:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 18:38:50 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 99A1FA1FE; Thu, 15 Nov 2012 18:38:30 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 54150] New: SlowQueryReportJmx mbean deregistration failure due to NPE - properties not set during pool close callback Date: Thu, 15 Nov 2012 18:38:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat Modules X-Bugzilla-Component: jdbc-pool X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alexfranken@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: priority bug_id assigned_to short_desc bug_severity classification reporter rep_platform bug_status version component product Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=54150 Priority: P2 Bug ID: 54150 Assignee: dev@tomcat.apache.org Summary: SlowQueryReportJmx mbean deregistration failure due to NPE - properties not set during pool close callback Severity: normal Classification: Unclassified Reporter: alexfranken@gmail.com Hardware: PC Status: NEW Version: unspecified Component: jdbc-pool Product: Tomcat Modules Found while debugging version 7.0.29 I found that our SlowQueryReportJmx mbean was not being deregistered during webapp shutdown. I tracked this down to a NPE. The interceptor properties are not being set (as is done in setupConnection) prior to the pool close callback. ConnectionPool.close(boolean) poolClosed callback produces NPE in SlowQueryReportJmx. {code} PoolProperties.InterceptorDefinition[] proxies = getPoolProperties().getJdbcInterceptorsAsArray(); for (int i=0; i clazz, String poolName) throws MalformedObjectNameException { ... NPE if (getProperties().containsKey(objectNameAttribute)) { ... {code} Sounds reasonable to set properties any time you need to instantiate interceptors. As is done in ConnectionPool.init(PoolConfiguration) {code} JdbcInterceptor interceptor = proxies[i].getInterceptorClass().newInstance(); interceptor.setProperties(proxies[i].getProperties()); interceptor.poolStarted(this); {code} -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org