Re: JDBC connections to 9.1

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JDBC connections to 9.1
Date: 2011-04-18 14:17:57
Message-ID: 1D1444218CDB28801BEEB27D@apophis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

--On 18. April 2011 09:44:38 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-18 14:20:21 Re: Typed table DDL loose ends
Previous Message Tom Lane 2011-04-18 13:44:38 Re: JDBC connections to 9.1

Browse pgsql-jdbc by date

  From Date Subject
Next Message Steve Singer 2011-04-18 14:26:59 Re: JDBC connections to 9.1
Previous Message Tom Lane 2011-04-18 13:44:38 Re: JDBC connections to 9.1