Re: Bad value for type BigDecimal : Y - Mailing list pgsql-jdbc

From Mikko Tiihonen
Subject Re: Bad value for type BigDecimal : Y
Date
Msg-id 4A313647.2020705@nitorcreations.com
Whole thread Raw
In response to Bad value for type BigDecimal : Y  (Ashish Jain <ashjain2@gmail.com>)
Responses Re: Bad value for type BigDecimal : Y
List pgsql-jdbc
Ashish Jain wrote:
> Hi,
>
> I am using postgresql 8.3 with openJPA 1.2.1. I hit the following error
>
> org.postgresql.util.
> PSQLException: Bad value for type BigDecimal : Y
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBigDecimal(AbstractJdbc2ResultSet.java:311)
>     at
> org.tranql.connector.jdbc.ResultSetHandle.getBigDecimal(ResultSetHandle.java:179)
>     at
> org.apache.openjpa.lib.jdbc.DelegatingResultSet.getBigDecimal(DelegatingResultSet.java:282)
>     at
> org.apache.openjpa.jdbc.sql.DBDictionary.getBigDecimal(DBDictionary.java:389)
>     at
> org.apache.openjpa.jdbc.sql.PostgresDictionary.getInt(PostgresDictionary.java:210)
>     at
> org.apache.openjpa.jdbc.sql.DBDictionary.getChar(DBDictionary.java:556)
>     at
> org.apache.openjpa.jdbc.sql.ResultSetResult.getCharInternal(ResultSetResult.java:288)

Do you store a boolean 'Y'/'N' in a char(1) column? Maybe openjpa needs to have
a different mapping that char for it.

-Mikko


pgsql-jdbc by date:

Previous
From: Richard Broersma
Date:
Subject: Re: Bad value for type BigDecimal : Y
Next
From: Johnny Luong
Date:
Subject: PreparedStatements with PG specific data types.