3 Replies Latest reply on Aug 21, 2003 4:44 AM by Nick Makris

    CMP EJB CLOB/BLOB retrieval issues from Oracle

    michaelraffoul Newbie

      I have some EJB 2.0 CMP Entity Beans, deployed on JBoss 3.07.

      In some of my beans I have Strings that I would like to map to a CLOB in my database as the Strings could easily be more than 4000 characters, and some byte arrays that I would like to map to a BLOB in my database to store files.

      When I use PostgreSQL as my datastore in JBoss I can store and retrieve data from my CLOBs and BLOBs just fine.

      However when I use an Oracle 9i (9.0.1) database for my datastore, I can write the information to the CLOB/BLOB fields (I can see it when I manually check the tables), but for some reason I cannot retrieve the information when I load my beans. The fields that map to the CLOB/BLOB are null, and eventually resave themselves overwriting the data in the database.

      When I test using LONG RAW as a type it works perfectly, but LONG RAW is not a standard SQL type. I do not want to convert my beans to BMP, and also do not want to have any Oracle specific code in my beans to store retrieve my information. I need my beans to be completely database independant and CMP

      Does anyone have any ideas what could be causing my retrieval problem and what I could do to try to fix it?