PostgreSQL Driver Queries Fail in 4.5.2.005

Description

PostgreSQL queries against the native JDBC PostgreSQL driver failing with errror:
Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented.

Swapping out the driver with newer JDBC 4 versions changes the error to a query syntax error above 9.2-1004, but still fails a basic SELECT * query.

Rolling back to Lucee 4.5.1.008 (the release version for CommandBox 2.0.0+0009) resolves the issue.

Environment

OSX 10.10.4
PostgreSQL 9.3.5
Lucee 4.5.2.005 (via Commandbox 2.2.0)

Attachments

1
  • 20 Aug 2015, 08:40 pm

Activity

Show:

Jon Clausen 31 August 2015 at 19:45

I've confirmed that patch 4.5.2.010 resolves this issue.

Matt J 31 August 2015 at 16:21

http://grepcode.com/file/repo1.maven.org/maven2/org.postgresql/postgresql/9.2-1002-jdbc4/org/postgresql/jdbc2/AbstractJdbc2Statement.java#AbstractJdbc2Statement.setQueryTimeout%28int%29

is the first version that has the fix.

artifact changed groups from postgresql to org.postgresql and has had a number of releases since.

the last version before switch still had
if (seconds > 0)
throw Driver.notImplemented(this.getClass(), "setQueryTimeout(int)");

current is 9.4-1201

http://grepcode.com/file/repo1.maven.org/maven2/org.postgresql/postgresql/9.4-1201-jdbc4/org/postgresql/jdbc2/AbstractJdbc2Statement.java#AbstractJdbc2Statement.setQueryTimeout%28int%29

Brad Wood 31 August 2015 at 14:20

Does the latest PostgreSQL driver not allow a timeout to be set? It appears you just wrapped it in a "try" with an empty "catch". Does that mean that an exception will still be thrown for every SQL when using PostgreSQL? Is there a better way to detect this?

Jon Clausen 21 August 2015 at 14:37
Edited

Thanks for jumping on this. thumbs up

Also, , I was incorrect about the driver swap working in CommandBox 2.2. I started a server with the old version of the driver this morning on CB 2.2 and it started throwing the errors again. There must have been a cache issue (or a user error on my part) that made it appear the 8.3 driver was working when, in reality, it was still running the older version of Lucee when I ran `box server start`

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 20 August 2015 at 20:43
Updated 12 May 2021 at 14:02
Resolved 21 August 2015 at 14:34

Flag notifications