vrijdag 18 mei 2007

updating blob field oracle with hibernate results in > 4000 bytes error

Ok so writing BLOB fields in Oracle (with hibernate) could give you a bla bla length > 4000 bytes error. [todo: lookup exact error] First of all I'll explain why. The BLOB fields in oracle work with a pointer and that pointer is 4000 bytes. The actual data is stored elsewhere. So your problem is that you're trying to write to this pointer instead. [todo: lookup source]

I believe (didn't have time to test yet [todo]) that the problem is within the driver. So first of all get the latest driver you can get.

oracle jdbc driver version


The following information is for completeness only.

hibernate version


hibernate mapping

<property name="xml" lazy="true" not-null="true" column="xml" />

java property

* xml data of this audit
private byte[] xml;

public byte[] getXml() {
return xml;

public void setXml(byte[] xml) {
this.xml = xml;

column definition

XML BLOB not null

Geen opmerkingen:

Een reactie posten