0 Replies Latest reply on Oct 16, 2006 3:10 AM by Georges Goebel

    strange Oracle 10g Blob Problem

    Georges Goebel Newbie


      I have a strange problem with Oracle 10g ( the database and the jdbc driver are both version 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
      but that didn't help

      Does somebody has an answer to the problem ?