pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
To: Ashish Jain <ashjain2@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bad value for type BigDecimal : Y
Date: Thu, 11 Jun 2009 19:52:23 +0300
Message-ID: <4A313647.2020705@nitorcreations.com> (raw)
In-Reply-To: <14af40510906110701g15f5f9edx1178b96a0237bcd0@mail.gmail.com>
References: <14af40510906110701g15f5f9edx1178b96a0237bcd0@mail.gmail.com>

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




view thread (8+ messages)  latest in thread

Message-ID: <4A313647.2020705@nitorcreations.com>
Permalink:  ../4A313647.2020705@nitorcreations.com/
Also on:    postgresql.org/message-id/4A313647.2020705@nitorcreations.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mikko.tiihonen@nitorcreations.com, ashjain2@gmail.com
  Subject: Re: Bad value for type BigDecimal : Y
  In-Reply-To: <4A313647.2020705@nitorcreations.com>
  References: <14af40510906110701g15f5f9edx1178b96a0237bcd0@mail.gmail.com> <4A313647.2020705@nitorcreations.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox