I have this problem too.
As a simple (but ugly) workaround we split the string to be stored into portions smaller than 4000 chars and save each part alone.
If you find a better solution please let me know :-).
If you're doing BMP then you can directly use JDBC.
clob = (java.sql.Clob) clobSqlObj;
String strClob = clob.getSubString((long) 1,(int) ((java.sql.Clob) clobSqlObj).length());
Thanks for your response. We are using CMP and our application is targeted towards several app servers (jboss, Silverstream, etc) and we are trying to keep the same codebase for all. I have seen a response elsewhere where they use a combination of CMP and BMP.
Is there a better way to do it ? I thought storing strings larger than 4000 characters should be pretty routine ...
> If you're doing BMP then you can directly use JDBC.
> clob = (java.sql.Clob) clobSqlObj;
> String strClob = clob.getSubString((long) 1,(int)
> ((java.sql.Clob) clobSqlObj).length());
You should be able to use CLOB with both JAWS and JBossCMP. I haven't personally tried it out, but all you should have to do is change the jdbc-type element of your column to CLOB. For more information, see the section titled "Telling JAWS about your tables" in Chapter 6: "Customizing JAWS" of the free manual
If you find a bug in this code, please post a bug report at sourceforge.