Beginner |
|
Joined: Sat Feb 26, 2005 12:09 pm Posts: 27 Location: Helsinki, Finland
|
The manual warns that the blob implementions in some JDBC drivers do not work properly. Are blobs supposed to work with Postgres?
I am using Postgres 8 and Hibernate 2.1.7c.
When I try to fetch an object that has a blob field (contains XML) from the database, the Postgres JDBC driver apparently tries to coerce the blob value into an int!
Caused by: org.postgresql.util.PSQLException: Bad value for type int : <?xml version="1.0" encoding="UTF-8"?>...
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.java:2508)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1984)
at org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(Jdbc3ResultSet.java:54)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:312)
at net.sf.hibernate.type.BlobType.get(BlobType.java:32)
...
|
|