From: | Pedro Salazar <pedro-b-salazar(at)ptinovacao(dot)pt> |
---|---|
To: | postgres <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: error getString() --> decodeUTF8 / |
Date: | 2003-04-11 10:40:15 |
Message-ID: | 1050057614.9821.26.camel@vitoria.intra.cet.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
I forgot to tell that I'm using the JDBC driver build from postgresql
7.3.2.
PS
On Fri, 2003-04-11 at 11:19, Pedro Salazar wrote:
> Greetings,
>
> I have function that returns a refcursor. When I call it in plpgsql
> shell, it returns all the rows correctly. But, When I call it in JDBC,
> when it tries to decode a string in specific row (7) it throws the
> following exception:
>
> java.lang.ArrayIndexOutOfBoundsException: 5
> at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:254)
> at org.postgresql.core.Encoding.decode(Encoding.java:165)
> at org.postgresql.core.Encoding.decode(Encoding.java:181)
> at
> org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:97)
>
> My refcursor returns the following list (the characters are in
> portuguese language):
>
> id | class
> ----+-------------
> 1 | Avenida
> 2 | Bairro
> 3 | Cais
> 4 | Estrada
> 5 | Largo
> 6 | Lugar
> 7 | Praça
> 8 | Rotunda
> 9 | Rua
> 10 | Sítio
> 11 | Travessa
> 12 | Urbanização
>
> The row number 7 (Praça) [character 'C' with cedilla] is throwing the
> above exception. How should I retrieve my string which has portuguese
> characters, in JDBC?
>
> thanks,
> Pedro Salazar.
--
PS
pedro-b-salazar(at)ptinovacao(dot)pt
PGP:0E129E31D803BC61
From | Date | Subject | |
---|---|---|---|
Next Message | Nagesh Yencharla | 2003-04-11 13:15:52 | passing a String[] to a Stored function |
Previous Message | Pedro Salazar | 2003-04-11 10:19:10 | error getString() --> decodeUTF8 / java.lang.ArrayIndexOutOfBoundsException: 5 |