karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3562) DefaultJDBCLock case sensitive issue
Date Wed, 01 Apr 2015 09:16:53 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14390262#comment-14390262
] 

Jean-Baptiste Onofré commented on KARAF-3562:
---------------------------------------------

Fixed on karaf-2.3.x: https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=commitdiff;h=9e18bdbaca76ef39fd709c9cc8c50bfd5dbf1c47

> 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é
>             Fix For: 4.0.0, 2.4.2, 3.0.4, 2.3.11
>
>
> There's a possible issue with:
> {code}
>  rs = getConnection().getMetaData().getTables(null, null, tableName, new String[] {"TABLE"});
> schemaExists = 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=KARAF_LOCK}}
> but Postgres stores the table name in its catalog in lowercase, so the query 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 checked
> - specialize PostgresJDBCLock if we can make the assumption that's pg default.
> And eventually improve Karaf docs to suggest trying to specify a lower case name in case
of errors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message