1 Reply Latest reply on Mar 6, 2002 4:56 AM by Pete Beck

    how to insert  large size Blob into database via JBoss

    df Newbie

      Hi,
      I am using JBoss-2.4.4 as my app server and Oracle 8i as database backend. I have written my own SQL query for inseting blob into database(and also retrieving it) in entity bean. When a blob of size <3k is inserted, it gets inserted properly but if this size exceeds(3k) then "null" is inserted into database. Where is the problem?

      Wating for the solution...

        • 1. Re: how to insert  large size Blob into database via JBoss
          Pete Beck Newbie

          The problem is, Oracle's handling of BLOBs from Java is crap.

          I am successfully storing binary objects much greater than 3K using JBoss and PostgreSQL 7.2, using plain old CMP.

          I was never able to get BLOBs working properly with Oracle and JDBC (even without JBoss).
          I doubt that you will be able to get it working at all using CMP. If you scan the net though, you'll probably find some help on getting BLOBS to work through JDBC. If I remember correctly, you have to use Oracle specific features of the JDBC driver.

          If you can get that working in a simple program using JDBC, then you should be able to make a BMP bean for storing the BLOB.

          It should be possible, because I believe ATG Dynamo can store images in the database using Oracle.