Another exception (Transaction level) - Mailing list pgsql-jdbc

From Ole Streicher
Subject Another exception (Transaction level)
Date
Msg-id qfd6fyx0xh.fsf@ebp00439.ebp.de
Whole thread Raw
Responses Re: Another exception (Transaction level)  (Paul Thomas <paul@tmsl.demon.co.uk>)
List pgsql-jdbc
Hi,

sorry if I flood you with lots of messages, but I am quite new to
Postgresql and I find a lot of questions not answered in the manual.

I get randomly (probably when I have concurrent r/w access) the error
message

java.sql.SQLException: ERROR:  SET TRANSACTION ISOLATION LEVEL must be called before any query

when I do a commit(). But I had set this level at the very beginning with

dbConn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);

BTW, I tried to use TRANSACTION_READ_UNCOMMITTED (which is described
in the manual) but in this case I get "Transaction isolation level 1
is not supported."

What is wrong here? Why do I get an error message when I try to use
the "read uncommitted" level, and why I get the exception when I use
commit() after setting the transaction level to "read committed"?

Ciao

Ole

pgsql-jdbc by date:

Previous
From: Ole Streicher
Date:
Subject: Problem with LargeObject/jdbc when writing short (Repost)
Next
From: Felipe Schnack
Date:
Subject: Re: quick question about PreparedStatements