Strange error using postgres 8.2 + JDBC 8.2 driver

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Strange error using postgres 8.2 + JDBC 8.2 driver
Date: 2007-01-17 16:58:37
Message-ID: 1169053117.22307.293.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I get the following error:

org.postgresql.util.PSQLException: ERROR: invalid byte sequence for
encoding "UTF8": 0x00
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:344)
[sni, goes into our code]

The statement is an insert into a table with various columns, one of
them being a bytea column.

The data base has locale C, encoding UTF-8, the "file.encoding" java
property is set to UTF-8 too, I think it should be OK if I'm not missing
something else...

The biggest problem is that I cant reproduce it in a self contained test
case, although in our system is consistently happening with the same
data.

I tried to set all the parameters with the same data as in our system,
including the byte array used to populate the bytea field, but in the
independent test the insert succeeds...

I tried to set the JDBC driver/server debug level to the highest
possible values, but I seem unable to get a more detailed error message
(in particular about which parameter is wrong, and what was it's value),
so I'm not completely sure I have the right values in the independent
test case (I got them from debugging our system and copy paste the
values).

Any ideas how could I further debug this ? It's show-stopper for us in
adopting 8.2.

Thanks,
Csaba.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2007-01-17 17:07:35 Re: Strange error using postgres 8.2 + JDBC 8.2 driver
Previous Message Kris Jurka 2007-01-16 21:16:25 Re: Message / Error Handler