pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ned T. Crigler <crigler@users.sourceforge.net>
To: pgsql-jdbc@postgresql.org
Subject: JDBC driver reports a protocol error for a CVS HEAD server
Date: Tue, 24 Apr 2007 15:46:49 -0700
Message-ID: <20070424224649.GA26016@xavtug.hell-city.com> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <20070424224649.GA26016@xavtug.hell-city.com>
Permalink:  ../20070424224649.GA26016@xavtug.hell-city.com/
Also on:    postgresql.org/message-id/20070424224649.GA26016@xavtug.hell-city.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: crigler@users.sourceforge.net
  Subject: Re: JDBC driver reports a protocol error for a CVS HEAD server
  In-Reply-To: <20070424224649.GA26016@xavtug.hell-city.com>
  References: <20070424224649.GA26016@xavtug.hell-city.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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