Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C1EB4633BBF for ; Thu, 11 Jun 2009 13:52:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 05826-09 for ; Thu, 11 Jun 2009 13:52:45 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by mail.postgresql.org (Postfix) with ESMTP id C6D36633B7D for ; Thu, 11 Jun 2009 13:52:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from auth-smtp.nebula.fi (auth-smtp.nebula.fi [217.30.180.105]) by mx3.hub.org (Postfix) with ESMTP id 0310237B6EF for ; Thu, 11 Jun 2009 13:52:45 -0300 (ADT) Received: from [127.0.0.1] (gw.nitor.fi [83.145.228.24]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.4/8.13.4) with ESMTP id n5BGqXWh022828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Jun 2009 19:52:33 +0300 Message-ID: <4A313647.2020705@nitorcreations.com> Date: Thu, 11 Jun 2009 19:52:23 +0300 From: Mikko Tiihonen User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: Ashish Jain CC: pgsql-jdbc@postgresql.org Subject: Re: Bad value for type BigDecimal : Y References: <14af40510906110701g15f5f9edx1178b96a0237bcd0@mail.gmail.com> In-Reply-To: <14af40510906110701g15f5f9edx1178b96a0237bcd0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200906/55 X-Sequence-Number: 19719 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