-->
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.  [ 1 post ] 
Author Message
 Post subject: Postgres binary type \0 not allowed IllegalArgumentException
PostPosted: Fri Feb 24, 2006 12:33 am 
Newbie

Joined: Fri Feb 24, 2006 12:05 am
Posts: 1
iam using hibernate3.0.5 version
our product using all kinds of database management system for management tool of product
problem is using binary field
if i use oracle or sql server then ok.
but postres always throw IllegarArgumentException (\0 not allowed)
these are hbm and model class and controller class implementation
performance is not critical. just operate then no problem

<Job.hbm.xml>
<property type="blob" name="requestMessage">
<!--
PostgreSql
-->
<column name="REQUEST_MESSAGE" sql-type="bytea" />
<!--
MySql
<column name="REQUEST_MESSAGE" sql-type="LONGBLOB" length="518576"/>
-->
<!--
Oracle
<column name="REQUEST_MESSAGE" sql-type="raw"/>
-->
</property>

<Job.java>
public class Job {
private byte[] requestMessage;
....
....
public byte[] getRequestMessage() {
return requestMessage;
}
public void setRequestMessage(byte[] requestMessage) {
this.requestMessage = requestMessage;
}
}

_________________
hi iam infomation retrieve system developer


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

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.