Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 105BD17EE7 for ; Wed, 1 Apr 2015 09:18:15 +0000 (UTC) Received: (qmail 13630 invoked by uid 500); 1 Apr 2015 09:17:52 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 13597 invoked by uid 500); 1 Apr 2015 09:17:52 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 13585 invoked by uid 99); 1 Apr 2015 09:17:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 09:17:52 +0000 Date: Wed, 1 Apr 2015 09:17:52 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (KARAF-3562) DefaultJDBCLock case sensitive issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-3562?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 resolved KARAF-3562. ----------------------------------------- Resolution: Fixed > DefaultJDBCLock case sensitive issue > ------------------------------------ > > Key: KARAF-3562 > URL: https://issues.apache.org/jira/browse/KARAF-3562 > Project: Karaf > Issue Type: Bug > Components: karaf-core > Affects Versions: 2.3.9 > Reporter: Paolo Antinori > Assignee: Jean-Baptiste Onofr=C3=A9 > Fix For: 4.0.0, 2.4.2, 3.0.4, 2.3.11 > > > There's a possible issue with: > {code} > rs =3D getConnection().getMetaData().getTables(null, null, tableName, ne= w String[] {"TABLE"}); > schemaExists =3D rs.next(); > {code} in > https://github.com/apache/karaf/blob/master/main/src/main/java/org/apache= /karaf/main/lock/DefaultJDBCLock.java#L165-L167 > I'm using Postgres9.3 without any specific configuration. > I have configured the locking mechanism to use the property {{karaf.lock.= jdbc.table=3DKARAF_LOCK}} > but Postgres stores the table name in its catalog in lowercase, so the qu= ery always returns a 0 length ResultSet. > I couldn't find a short form in the JDBC api to ignore the case. > I think this might be the default on Postgres, to convert it's catalog to= lowercase, but I learn that this depends on the db configuration usually. > So I suggest one of this possible options: > - try both upper and lower case > - improve logging to show which is table with the exact case that is chec= ked > - specialize PostgresJDBCLock if we can make the assumption that's pg def= ault. > And eventually improve Karaf docs to suggest trying to specify a lower ca= se name in case of errors. -- This message was sent by Atlassian JIRA (v6.3.4#6332)