string character corruption problem and broken connection problem

From: "Ethan Perry" <ethanLP(at)media(dot)mit(dot)edu>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: string character corruption problem and broken connection problem
Date: 2003-12-02 18:57:37
Message-ID: 00a801c3b906$2749dbc0$f0095512@lexington
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm using a user-defined function that refers to a shared library that I've built out of a third party C++ application.

The function returns a string of values and works fine in the psql command line environment. When I call this function over JDBC, however, the string of values sometimes has garbage characters interspersed in:
for instance, "¢B¢B│ᄍ)￘￙)ᄄg)Affect 1.85" instead of just "Affect 1.85"

After these characters are in the resulting string from the ResultSet multiple times, the postgreqsql server eventually sometimes goes down, and JDBC reports the following error:

The backend has broken the connection. Possibly the action you have attempted has caused it to close.
Exception in updateMsg msgId9106The backend has broken the connection. Possibly the action you have attempted has caused it to close.
at org.postgresql.PG_Stream.ReceiveChar(PG_Stream.java:143)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:68)
at org.postgresql.Connection.ExecSQL(Connection.java:398)
at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
at anthroViz.model.MessageReader.updateMsg(MessageReader.java:72)

Any suggestions on what to look for that could be causing this would be very appreciated.

-E

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2003-12-03 00:47:10 Re: string character corruption problem and broken connection problem
Previous Message Oliver Jowett 2003-12-02 08:18:49 patch: add get/setPrepareThreshold to PGStatement, PGConnection, datasources