[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - strange Oracle 10g Blob Problem

georges.goebel do-not-reply at jboss.com
Mon Oct 16 03:10:48 EDT 2006


Hi,

I have a strange problem with Oracle 10g ( 10.2.0.1.0). the database and the jdbc driver are both version 10.2.0.1.0. I use JBoss 4.0.4GA and I have a struts web application with ejb3 session and entity beans.

I have a 1-n relation in the ejb part : Command - CommandLine 
The CommandLine entity bean has a byte[] filed to store a picture.
When I try to persiste the command I have different scenarios.

1) When the 1st CommandLine has a picture byte[].length>0 an the 2nd commandline has a pictore or not, the 1st commandline is stored in the database !

2) When the 1st CommandLine has NO picture byte[].length == 0 and the 2nd CommandLine has a picture, the 2nd CommandLine Picture is NOT stored in the database !!! I get NO error.

I debugged my application and could not find an error because the same code works for both scenarios correctly for HSQLDB (DefaultDS). Only with Oracle the 2nd scenario does not work.

The work around at the moment is to insert 1 byte as picture in the DB when there is no picture. Then the 2nd scenario works also for Oracle.

I tried the parameters :
property name="hibernate.jdbc.batch_size">0
true
but that didn't help

Does somebody has an answer to the problem ?

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978450#3978450

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978450



More information about the jboss-user mailing list