Fix weird bug under JRuby + JDBC only