Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 76B0E635152 for ; Wed, 10 Jun 2009 08:06:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49180-06 for ; Wed, 10 Jun 2009 08:06:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fafnir.androme.com (fafnir.androme.com [62.58.96.158]) by mail.postgresql.org (Postfix) with ESMTP id 545AB632341 for ; Wed, 10 Jun 2009 07:59:28 -0300 (ADT) Received: by fafnir.androme.com (Postfix, from userid 1003) id 08669B9BDBF; Wed, 10 Jun 2009 12:59:25 +0200 (CEST) Message-ID: <4A2F920C.2090204@androme.es> Date: Wed, 10 Jun 2009 12:59:24 +0200 From: Ramon Poca User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Random crashes on getConnection Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/46 X-Sequence-Number: 19710 I've traced the crash to: org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(PGStream, ProtocolConnectionImpl, Logger) line: 470 For some reason, client_encoding gets changed back and forth from UNICODE to LATIN9. When it's LATIN9, it causes the exception. In my connection URL/parameters I do not force any encoding. LATIN9 is the encoding the database is set to. What can be causing this switch? (Message that caused the exception: beresp = 83 (E), client_encoding=LATIN9) Any ideas? ----------- >I get random exceptions on GetConnection() on a Quartz-based job. >Sometimes everything works, and sometimes I get a "Protocol Error. >Session setup failed". Does anybody know what might be happening? >Client: Both postgresql-8.3-604.jdbc4.jar and >postgresql-8.4dev-700.jdbc4.jar. >Server: Postgres 8.1. The databases are stored in LATIN9 encoding. >JVM: java-6-sun-1.6.0.12 >SEVERE: com.androme.phemium.statistics.EligibleCustomerList@3b1d04 >org.postgresql.util.PSQLException: Protocol error. Session setup >failed. > at >org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:481) > at >org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:101) > at -- Ramon Poca
ramon.poca@androme.es