Re: RES: Problems retrieving data from bytea field - Mailing list pgsql-jdbc

From Sherman Wood
Subject Re: RES: Problems retrieving data from bytea field
Date
Msg-id 000201c31ecb$54f088b0$0a0110ac@SHERMANLNCVEH0
Whole thread Raw
In response to RES: Problems retrieving data from bytea field  ("Iran" <iran@isic.com.br>)
List pgsql-jdbc
 
I am still having problems with this. My environment is JDK 1.4.1_02, Win2K, Eclipse 2.1, Postgres 7.3.2.
 
When I select a row with a bytea in it and try to get the blob, I am getting the following behavior:
 
Under pg72jdbc2.jar:
 
Bad Integer <?xml version="1.0"?>\012<!DOCTYPE hibernate-mapping PUBLIC ....
 at org.postgresql.jdbc2.ResultSet.toInt(ResultSet.java:1481)
 at org.postgresql.jdbc2.ResultSet.getInt(ResultSet.java:247)
 at org.postgresql.jdbc2.ResultSet.getBlob(ResultSet.java:934)
 at org.postgresql.jdbc2.ResultSet.getBlob(ResultSet.java:929)
 at net.sf.hibernate.type.BlobType.get(BlobType.java:26)
 at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:59)
 at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51)
 at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:65)
 at net.sf.hibernate.loader.Loader.hydrate(Loader.java:408)
 at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:358)
 at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:332)
 at net.sf.hibernate.loader.Loader.getRow(Loader.java:273)
 at net.sf.hibernate.loader.Loader.doFind(Loader.java:150)
 at net.sf.hibernate.loader.Loader.find(Loader.java:602)
 at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:860)
 at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1338)
 at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1317)
 at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1309)
 at com.galenworks.procedurelink.hibernate.test.Populate.test6(Populate.java:374)
 at com.galenworks.procedurelink.hibernate.test.Populate.main(Populate.java:411)
Under pg73jdbc2.jar:
 
Bad Integer <?xml version="1.0"?>\012<!DOCTYPE hibernate-mapping PUBLIC \012...
 at org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet.java:700)
 at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSet.java:144)
 at org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(Jdbc3ResultSet.java:41)
 at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:262)
 at net.sf.hibernate.type.BlobType.get(BlobType.java:26)
 at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:59)
 at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51)
 at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:65)
 at net.sf.hibernate.loader.Loader.hydrate(Loader.java:408)
 at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:358)
 at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:332)
 at net.sf.hibernate.loader.Loader.getRow(Loader.java:273)
 at net.sf.hibernate.loader.Loader.doFind(Loader.java:150)
 at net.sf.hibernate.loader.Loader.find(Loader.java:602)
 at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:860)
 at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1338)
 at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1317)
 at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1309)
 at com.galenworks.procedurelink.hibernate.test.Populate.test6(Populate.java:367)
 at com.galenworks.procedurelink.hibernate.test.Populate.main(Populate.java:404)
 
Any help would be appreciated.
 
Thanks,
 
 
Sherman
 

pgsql-jdbc by date:

Previous
From: Vincenzo Angelone
Date:
Subject: PGSQL Connection
Next
From: Dave Cramer
Date:
Subject: Re: PGSQL Connection