Thread: java.sql.SQLException: ERROR: invalid byte sequence for encoding "UNICODE": 0xe3936e

Hi!

I'm using PostgreSQL 8.0.4 with UNICODE encoding  and accessing it with
JDBC3 driver 8.0.313. Sometimes, we get this error:

java.sql.SQLException: ERROR: invalid byte sequence for encoding
"UNICODE": 0xe3936e
    at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
    at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
    at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:392)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240)
    at pt.moredata.dao.core.SQLReader._read(SQLReader.java:256)

I'm not sure what I can do. I thought of these alternatives:

    * May this be a network error? We're using a wireless network and
      sometimes it has problems. Would SSL help reducing comms errors,
      since it has more accurate error detection than TCP?
    * May this be caused by bad data coming from the java app? Is this
      possible, knowing that Java always works in Unicode internally?

Any thoughts?

Thanks in advance.

Fernando

--
Fernando Fernandez
http://www.moredata.pt/