-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: PostgreSQL ByteA (VarBinary, BLOB) & JPA problem
PostPosted: Tue Feb 05, 2008 2:29 pm 
Newbie

Joined: Tue Feb 24, 2004 11:35 am
Posts: 9
Location: Sofia, Bulgaria
Hi,

I have a table with ByteA column (varbinary, binary, blob) in PostgreSQL. When I try to insert something in that table I have the following error:

org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ERROR: column "medium_image" is of type bytea but expression is of type oid

In current case the value of that column is NULL.

How can I solve that problem? If I have pure JDBC statement I know what to do, but I don't know what to do when Hibernate works with JDBC.


Regards,
Miro.

_________________
Regards,
Miro


Top
 Profile  
 
 Post subject: Re: PostgreSQL ByteA (VarBinary, BLOB) & JPA problem
PostPosted: Tue Feb 05, 2008 2:47 pm 
Newbie

Joined: Tue Feb 24, 2004 11:35 am
Posts: 9
Location: Sofia, Bulgaria
Miro wrote:
Hi,

I have a table with ByteA column (varbinary, binary, blob) in PostgreSQL. When I try to insert something in that table I have the following error:

org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ERROR: column "medium_image" is of type bytea but expression is of type oid

In current case the value of that column is NULL.

How can I solve that problem? If I have pure JDBC statement I know what to do, but I don't know what to do when Hibernate works with JDBC.


Regards,
Miro.


I try with
<property name="hibernate.jdbc.use_streams_for_binary" value="false"/>
then with "true", but without result.


Miro.

_________________
Regards,
Miro


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 6:24 am 
Newbie

Joined: Fri Dec 15, 2006 6:08 am
Posts: 18
Location: France
Hi,
I had the same problem and resolve it by changing the column type from bytea to oid.
More information here: http://jdbc.postgresql.org/documentatio ... -data.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.