1 Reply Latest reply on Aug 8, 2003 6:44 AM by Mark Frost

    Storing CMP Clob field fails for > 4000 characters

    Mark Frost Newbie

      My CMP EntityBean has a Clob field. I can read from it fine. I can write OK provided the characters < 4000. Greater than this and the column will be set to null.

      Code extract:
      public abstract class XmlCompanyBean implements EntityBean {
      // ejb accessor methods for persistent fields...

      public abstract String getXml();
      public abstract void setXml(String xml);


      My jbosscmp-jdbc.xml file contains....


      I noticed by turning up the log4j settings the following:

      16:22:00,139 DEBUG [XmlCompanyRW] Executing SQL: UPDATE XML_COMPANY SET XML=? WHERE CACHE_KEY=?

      This implies JBoss isn't using streaming to update the clob column (Normally with Oracle Clobs you have to use Lob locators and stream manipulation to update/insert clobs - just an UPDATE clob-column won't do it)

      Can you tell me how you got this to work? Is there a special setting I need in standardjbosscmp-jdbc.xml. I notice the shipped copy of this file has no mention of Clobs but it does on Blobs - do I need to add something?

      JBoss version: jboss-3.2.1_tomcat-4.1.24
      Oracle version:
      JDBC version:

      Any pointers or clues would be very much appreciated if others have got Clobs to work.

      Many thanks