autocommit trouble with jdbc on Postgres 7.4 - Mailing list pgsql-jdbc

From Bob Cart
Subject autocommit trouble with jdbc on Postgres 7.4
Date
Msg-id 45F880C7-22FC-11D8-97C0-000A95BA17FE@cartdev.com
Whole thread Raw
Responses Re: autocommit trouble with jdbc on Postgres 7.4
Re: autocommit trouble with jdbc on Postgres 7.4
Re: autocommit trouble with jdbc on Postgres 7.4
List pgsql-jdbc
PostgreSQL 7.4 no longer supports server side SET AUTOCOMMIT TO OFF,
thanks to Tom Lane. Problem is my java application server now breaks.
When I try to save a record in the database, I get
"java.sql.SQLException: ERROR:  SET AUTOCOMMIT TO OFF is no longer
supported".  <fontfamily><param>Verdana</param>The code that sends
this is jdbc compliant and works with about a dozen other rdbms
including postgresql7.3. Isn't he whole point of jdbc to make it so
clients don't need to be rewritten each database??? Please don't tell
me to change my code code - it isn't mine and I can't.</fontfamily>


Questions:


1) Does this mean that the jdbc driver that ships with pg7.4 isn't up
to speed with the new autocommit change? What about the 7.4
development version of the driver? Does it properly handle the SQL for
the new 7.4 change? I tried it and it also failed, but maybe I
installed it improperly. I simply replaced the existing postgresql.jar
file with the <fontfamily><param>Lucida Grande</param>devpgjdbc3-1.jar
(renamed as</fontfamily> postgresql.jar) and restarted. Didn't work.


2) is there a version of the jdbc driver that won't send "SET
AUTOCOMMIT TO OFF" to the postgresql7.4 server when I use
    <fontfamily><param>Verdana</param>Connection.setAutoCommit(false)


3) If there is a driver that works, do I need to do something other
than just replacing the existing </fontfamily>postgresql.jar file? I'd
assume the classpath etc would be the same it that case, but I've
tried it building 7.4 --with-java from scratch and also tried the SuSE
7.4 RPM in addition to replacing the jar file as mentioned. Each fails.


Any clues appreciated. Thanks in advance!


Bob
PostgreSQL 7.4 no longer supports server side SET AUTOCOMMIT TO OFF,
thanks to Tom Lane. Problem is my java application server now breaks.
When I try to save a record in the database, I get
"java.sql.SQLException: ERROR:  SET AUTOCOMMIT TO OFF is no longer
supported".  The code that sends this is jdbc compliant and works with
about a dozen other rdbms including postgresql7.3. Isn't he whole point
of jdbc to make it so clients don't need to be rewritten each
database??? Please don't tell me to change my code code - it isn't mine
and I can't.

Questions:

1) Does this mean that the jdbc driver that ships with pg7.4 isn't up
to speed with the new autocommit change? What about the 7.4 development
version of the driver? Does it properly handle the SQL for the new 7.4
change? I tried it and it also failed, but maybe I installed it
improperly. I simply replaced the existing postgresql.jar file with the
devpgjdbc3-1.jar (renamed as postgresql.jar) and restarted. Didn't
work.

2) is there a version of the jdbc driver that won't send "SET
AUTOCOMMIT TO OFF" to the postgresql7.4 server when I use
    Connection.setAutoCommit(false)

3) If there is a driver that works, do I need to do something other
than just replacing the existing postgresql.jar file? I'd assume the
classpath etc would be the same it that case, but I've tried it
building 7.4 --with-java from scratch and also tried the SuSE 7.4 RPM
in addition to replacing the jar file as mentioned. Each fails.

Any clues appreciated. Thanks in advance!

Bob

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Jdbc driver on linux
Next
From: Dave Cramer
Date:
Subject: Re: autocommit trouble with jdbc on Postgres 7.4