Re: autocommit trouble with jdbc on Postgres 7.4

Поиск
Список
Период
Сортировка
От Bob Cart
Тема Re: autocommit trouble with jdbc on Postgres 7.4
Дата
Msg-id A0B19666-235F-11D8-97C0-000A95BA17FE@cartdev.com
обсуждение исходный текст
Ответ на autocommit trouble with jdbc on Postgres 7.4  (Bob Cart <bob@cartdev.com>)
Список pgsql-jdbc
Thanks for the quick reply. Unfortunately, I don't have a nice package
of test code for you. I'm using a system called Servoy. It is a
java-based GUI forms type development environment.  You can download
it from:


http://developer.servoy.com/generic.jsp?taxonomy_id=251


It has the firebird database included so to test with pg, you go to
the edit menu, then preferences, then DB servers to set up the new
connection with the typical jdbc:postgresql://<<server>/<<database>.


You can then go to the file menu and select 'new solution', give it a
name then select the database you just set up for the form you are
creating. Add a table and columns/fields and you are ready to test. To
get the error condition, just click the add new record button, enter
some data into the field you created, then click add new record again.
That should throw the exception.


Thanks for taking a look. Let me know if there is anything I can do to
assist.


Bob


On Nov 29, 2003, at 10:13 PM, Bob Cart wrote:


<excerpt>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</excerpt>
Thanks for the quick reply. Unfortunately, I don't have a nice package
of test code for you. I'm using a system called Servoy. It is a
java-based GUI forms type development environment.  You can download it
from:

http://developer.servoy.com/generic.jsp?taxonomy_id=251

It has the firebird database included so to test with pg, you go to the
edit menu, then preferences, then DB servers to set up the new
connection with the typical jdbc:postgresql://<server>/<database>.

You can then go to the file menu and select 'new solution', give it a
name then select the database you just set up for the form you are
creating. Add a table and columns/fields and you are ready to test. To
get the error condition, just click the add new record button, enter
some data into the field you created, then click add new record again.
That should throw the exception.

Thanks for taking a look. Let me know if there is anything I can do to
assist.

Bob

On Nov 29, 2003, at 10:13 PM, Bob Cart wrote:

> 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 по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: autocommit trouble with jdbc on Postgres 7.4
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: autocommit trouble with jdbc on Postgres 7.4