Re: JDBC connections to 9.1
Bernd Helmle <mailings@oopsware.de>
From: Bernd Helmle <mailings@oopsware.de>
To: Tom Lane <tgl@sss.pgh.pa.us>, Steve Singer <ssinger@ca.afilias.info>
Cc: PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Date: 2011-04-18T14:17:57Z
Lists: pgsql-hackers
--On 18. April 2011 09:44:38 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: >> I'm getting JDBC exceptions when I try to connect to 9.1 (master) with >> the postgresql-9.0-801.jdbc3.jar I don't have this issue with 9.0. > > Hmm, what shows up in the postmaster log? A quick check with an application here gives the following with JDBC loglevel=2 16:09:47.910 (1) PostgreSQL 9.1devel JDBC4 (build 900) 16:09:47.914 (1) Trying to establish a protocol version 3 connection to localhost:5438 16:09:47.930 (1) FE=> StartupPacket(user=bernd, database=mailstore, client_encoding=UNICODE, DateStyle=ISO, extra_float_digits=2) 16:09:47.933 (1) <=BE AuthenticationOk 16:09:47.942 (1) <=BE ParameterStatus(application_name = ) 16:09:47.942 (1) <=BE ParameterStatus(client_encoding = UTF8) org.postgresql.util.PSQLException: Protocol error. Session setup failed. at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:498) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:112) 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.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:32) at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) at org.postgresql.Driver.makeConnection(Driver.java:393) at org.postgresql.Driver.connect(Driver.java:267) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at de.oopsware.mailstore.PGSQLMailstore.connect(Unknown Source) at de.oopsware.mailstore.PGSQLMailstore.connect(Unknown Source) at mailstore.main(Unknown Source) SQLException: SQLState(08P01) getConnection failed: org.postgresql.util.PSQLException: Protocol error. Session setup failed. org.postgresql.util.PSQLException: Protocol error. Session setup failed. Hmm, seems it stumbles while reading client_encoding.... -- Thanks Bernd