ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <lmead...@apache.org>
Subject Re: Invalid character
Date Thu, 02 Feb 2006 13:09:10 GMT
This is an issue in the JDBC driver, not iBATIS.

I'd suggest deleting the row with one of the native DB toosl that come
with postresql, or setting the field's value to null or "".

Larry


On 2/2/06, Johan Oskarsson <johan@oskarsson.nu> wrote:
> I've managed to get a very strange character in one of my tables.
> This means I cannot select from that table without ibatis
> throwing this exception. The database is using unicode,
> so this is just some non existing character that somehow got in there.
>
> I'd like to just ignore this error and keep retrieving the other rows.
> Is this possible:
>
> The exception:
>
> [02-02 12:55:27] main (LabelIndexer.java:136) - Could not add document
> to index: 100965
> org.postgresql.util.PSQLException: Invalid character data was found.
> This is most likely caused by stored data containing characters that are
> invalid for the character set the database was created in.  The most
> common example of this is storing 8bit data in a SQL_ASCII database.
>         at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1891)
>         at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:2190)
>         at
> fm.last.lucene.indexers.catsearch.LabelIndexer.index(LabelIndexer.java:132)
>         at
> fm.last.lucene.indexers.CatSearchIndexer.index(CatSearchIndexer.java:51)
>         at
> fm.last.lucene.indexers.CatSearchIndexer.main(CatSearchIndexer.java:73)
> Caused by: java.io.IOException: UTF-8 string representation was truncated
>         at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:304)
>         at org.postgresql.core.Encoding.decode(Encoding.java:179)
>         at org.postgresql.core.Encoding.decode(Encoding.java:193)
>         at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1887)
>         ... 4 more
>
>
>

Mime
View raw message