Skip site navigation (1) Skip section navigation (2)

BUG #3615: Exception with loading string value

From: "Sundarrajan" <ssuyamboo(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3615: Exception with loading string value
Date: 2007-09-17 19:29:53
Message-ID: 200709171929.l8HJTrLG090153@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3615
Logged by:          Sundarrajan
Email address:      ssuyamboo(at)yahoo(dot)com
PostgreSQL version: 8.1.3
Operating system:   Windows
Description:        Exception with loading string value
Details: 

I am trying to load table data using hibernate 3.1/postgres driver.

I tried with the following driver versions,
postgresql-8.2-504.jdbc2ee.jar 
postgresql-8.2-506.jdbc2ee.jar 
postgresql-8.2-506.jdbc3.jar 


All ended up in ,
Caused by: org.postgresql.util.PSQLException: Bad value for type int :
STOREMODEL
	at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.jav
a:2653)
	at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.ja
va:1983)
	at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.ja
va:2327)
	at org.hibernate.type.IntegerType.get(IntegerType.java:28)
	at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
	at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
	at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
	at
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntit
yPersister.java:1899)
	at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1372)
	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1300)
	at org.hibernate.loader.Loader.getRow(Loader.java:1197)
	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
	at org.hibernate.loader.Loader.doQuery(Loader.java:689)
	at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.ja
va:224)
	at org.hibernate.loader.Loader.doList(Loader.java:2145)


This happened when my code tried to load String data of data type bpchar in
postgres. Column size used in table defn is 10 and the data length is 10.
Could you please guide me how to resolve this?

Thanks
Sundar

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-09-18 03:51:50
Subject: Re: psql CLI: warn about ongoing transaction on exit
Previous:From: Stefan KaltenbrunnerDate: 2007-09-17 18:54:45
Subject: Re: autovacuum starting for no apparent reason

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group