Skip site navigation (1) Skip section navigation (2)

Invalid message format Exception

From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Invalid message format Exception
Date: 2010-05-10 14:19:04
Message-ID: 00da01caf04b$c182f900$4488eb00$@com (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-sql
Hi,

I'm using PostgreSQL 8.2 and my production server is based on CentOS release
5.2 (Final).

JDBC Jar: postgresql-8.2-508.jdbc4.jar

I noticed from my server log that some INSERT statements are failing with
"invalid message format" PSQLException.  Once this exception is thrown, it
is not committed to the database.  What could be the reason for this?

EXCEPTION
org.postgresql.util.PSQLException: ERROR: invalid message format

STACKTRACE
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorI
mpl.java:1592)
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.ja
va:1327)
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j
ava:452)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2St
atement.java:337)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2State
ment.java:283)

I also read about this on:
http://archives.postgresql.org/pgsql-jdbc/2008-04/msg00085.php
	"JDBC driver is doing something wrong when calculating a message
length or message content for the frontend/backend protocol"
	But how do I resolve this issue?
http://archives.postgresql.org/pgsql-jdbc/2004-03/msg00142.php
	you can't represent a \0 byte in a text/varchar constant

Even though I don't have much idea on encoding, I have a little doubt on
whether encoding is a problem.

mydb=# \l
              List of databases
         Name         |  Owner   | Encoding
----------------------+----------+-----------
 mydb                 | zoniac   | SQL_ASCII



Responses

pgsql-sql by date

Next:From: Gerardo HerzigDate: 2010-05-10 18:40:12
Subject: advice on query joining 10 tables
Previous:From: Torsten Z├╝hlsdorffDate: 2010-05-10 09:35:14
Subject: [Trigger] Help needed with NEW.* and TG_TABLE_NAME

pgsql-jdbc by date

Next:From: I. B.Date: 2010-05-11 13:11:06
Subject: Wrong results of queries
Previous:From: Samuel GendlerDate: 2010-05-08 07:24:44
Subject: CopyManager bug + fix

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group