[
https://issues.apache.org/jira/browse/KARAF-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré 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é
> 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)