pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC driver reports a protocol error for a CVS HEAD server
3+ messages / 3 participants
[nested] [flat]
* JDBC driver reports a protocol error for a CVS HEAD server
@ 2007-04-24 22:46 Ned T. Crigler <crigler@users.sourceforge.net>
2007-04-24 23:23 ` Re: JDBC driver reports a protocol error for a CVS HEAD server Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 3+ messages in thread
From: Ned T. Crigler @ 2007-04-24 22:46 UTC (permalink / raw)
To: pgsql-jdbc
The JDBC driver does not connect successfully to a CVS HEAD server
(updated as of today) when using a database set to UTF8 encoding;
enabling the debug messages in the driver shows that it is sending
client_encoding=UNICODE in the startup packet, but the server is
reporting client_encoding=UTF8 back to the driver, causing the driver
to complain:
15:25:23.136 (1) PostgreSQL 8.2devel JDBC3 with SSL (build 503)
15:25:23.151 (1) Trying to establish a protocol version 3 connection to localhost:5432
15:25:23.171 (1) FE=> StartupPacket(user=crigler, database=wave, client_encoding=UNICODE, DateStyle=ISO)
15:25:23.175 (1) <=BE AuthenticationOk
15:25:23.202 (1) <=BE ParameterStatus(client_encoding = UTF8)
org.postgresql.util.PSQLException: Protocol error. Session setup failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:470)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:98)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:382)
at org.postgresql.Driver.connect(Driver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at DBConn.<init>(DBConn.java:24)
at g.main(g.java:11)
SQLException: SQLState(08001)
getConnection failed: org.postgresql.util.PSQLException: Protocol error. Session setup failed.
SQL Error: Database Open Failure
org.postgresql.util.PSQLException: Protocol error. Session setup failed.
--
Ned T. Crigler
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: JDBC driver reports a protocol error for a CVS HEAD server
2007-04-24 22:46 JDBC driver reports a protocol error for a CVS HEAD server Ned T. Crigler <crigler@users.sourceforge.net>
@ 2007-04-24 23:23 ` Kris Jurka <books@ejurka.com>
2007-04-25 05:34 ` Re: [HACKERS] JDBC driver reports a protocol error for a CVS HEAD server Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Kris Jurka @ 2007-04-24 23:23 UTC (permalink / raw)
To: Ned T. Crigler <crigler@users.sourceforge.net>; +Cc: pgsql-jdbc; pgsql-hackers@postgresql.org
On Tue, 24 Apr 2007, Ned T. Crigler wrote:
> The JDBC driver does not connect successfully to a CVS HEAD server
> (updated as of today) when using a database set to UTF8 encoding;
> enabling the debug messages in the driver shows that it is sending
> client_encoding=UNICODE in the startup packet, but the server is
> reporting client_encoding=UTF8 back to the driver, causing the driver
> to complain:
Indeed, referring to -hackers as this is a recent backend change. The
backend is reporting the database encoding as the client encoding. When a
connection is created with a startup packet sending client_encoding =
UNICODE the server responds with a ParameterStatus message of
client_encoding = server encoding. So something has gone wrong here.
It's not just a UNICODE/UTF-8 problem as I see the server responding with
LATIN1 with a LATIN1 database.
Kris Jurka
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [HACKERS] JDBC driver reports a protocol error for a CVS HEAD server
2007-04-24 22:46 JDBC driver reports a protocol error for a CVS HEAD server Ned T. Crigler <crigler@users.sourceforge.net>
2007-04-24 23:23 ` Re: JDBC driver reports a protocol error for a CVS HEAD server Kris Jurka <books@ejurka.com>
@ 2007-04-25 05:34 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2007-04-25 05:34 UTC (permalink / raw)
To: Kris Jurka <books@ejurka.com>; +Cc: Ned T. Crigler <crigler@users.sourceforge.net>; pgsql-jdbc; pgsql-hackers@postgresql.org; Peter Eisentraut <peter_e@gmx.net>
Kris Jurka <books@ejurka.com> writes:
> On Tue, 24 Apr 2007, Ned T. Crigler wrote:
>> The JDBC driver does not connect successfully to a CVS HEAD server
>> (updated as of today) when using a database set to UTF8 encoding;
> Indeed, referring to -hackers as this is a recent backend change. The
> backend is reporting the database encoding as the client encoding.
Confirmed here: psql has stopped obeying the PGCLIENTENCODING
environment variable. Can't help suspecting that the recent
GUC-parameter-rollback change broke it. (That has got to be one
of the most snakebit projects we've had ... apparently the latest
try needs reverted, again.)
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-04-25 05:34 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-24 22:46 JDBC driver reports a protocol error for a CVS HEAD server Ned T. Crigler <crigler@users.sourceforge.net>
2007-04-24 23:23 ` Kris Jurka <books@ejurka.com>
2007-04-25 05:34 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox