JDBC driver reports a protocol error for a CVS HEAD server

From: "Ned T(dot) Crigler" <crigler(at)users(dot)sourceforge(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: JDBC driver reports a protocol error for a CVS HEAD server
Date: 2007-04-24 22:46:49
Message-ID: 20070424224649.GA26016@xavtug.hell-city.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2007-04-24 23:23:43 Re: JDBC driver reports a protocol error for a CVS HEAD server
Previous Message Marcos Azevedo 2007-04-24 22:14:15 Re: Fwd: PgAdmin pt_BR traduction

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2007-04-24 23:23:43 Re: JDBC driver reports a protocol error for a CVS HEAD server
Previous Message Tom Lane 2007-04-24 19:32:10 Re: JDBC feature request: auto savepoint per command