Re: BUG #15013: JNI-JDBC: org.postgresql.util.PSQLException: FEHLER: ungültiges Message-Format

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: davecramer(at)gmail(dot)com
Cc: jt(at)leutek(dot)de, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15013: JNI-JDBC: org.postgresql.util.PSQLException: FEHLER: ungültiges Message-Format
Date: 2018-01-19 05:11:46
Message-ID: 20180119.141146.168344527.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello.

At Thu, 18 Jan 2018 14:33:35 -0500, Dave Cramer <davecramer(at)gmail(dot)com> wrote in <CADK3HHK+JXypTQ1dVCXNTS2GP69MmXzV40iJicaH=b=1CpyuOg(at)mail(dot)gmail(dot)com>
> Hi,
>
> I'm at a loss here. What interface is this ? pl/java ?
>
> Dave Cramer

It seems a CPU-native client program that uses JDBC driver via
JNI and some kind of protocol error happened. (I recomment to use
libpq directly..)

At first, please provide the version of the JDBC driver and a
full stack exception, not only the last one, then ask the
following mailling list.

https://jdbc.postgresql.org/community/mailinglist.html#general

If you can parepre a small self-contained stuff to replay your
problem, it would be a great help for others. I suppose it is
feasible as a small Java program not using JNI.

>
> On 17 January 2018 at 09:26, PG Bug reporting form <noreply(at)postgresql(dot)org>
> wrote:
>
> > The following bug has been logged on the website:
> >
> > Bug reference: 15013
> > Logged by: Junior Tcheho
> > Email address: jt(at)leutek(dot)de
> > PostgreSQL version: 10.1
> > Operating system: Windows 2008 Server R2
> > Description:
> >
> > Hello,
> >
> > I get the following error after execution a query which was created throw
> > JNI:
> > org.postgresql.util.PSQLException: FEHLER: ungültiges Message-Format.
> >
> > I have created the String for the query using the call:
> > String(byte[] bytes, String charsetName).
> >
> >
> > When working with env->NewStringUTF(pcCharArray), there is no error, but
> > not
> > all characters are properly handled. E.g: €(Euro-Char)

It takes (modified) UTF8 string. As far as I can see '0x80' (�
in CP1252) doesn't work for the function..

If you NewByteArray'ed the pcCharArray and using "CP1252" in the
former case, it would work on a German environment and you will
get 'ungültige Zeichenkette in Message' instead if something's
wrong in sending a query. It seems that the error happend at bind
time. Anyway full stack exception gives a crue to that.

> > Regard.
> > Junior Tcheho

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-01-19 09:24:56 Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?
Previous Message Sandeep Thakkar 2018-01-19 04:12:03 Re: BUG #15015: Zilib1.dll library missing if only command line tools installed