Wednesday, 20 March 2013

Converting String to oracle.jbo.domain.ClobDomain in adf


I got an error - " Cannot convert Testing Clob<br/> of type class java.lang.String to class oracle.jbo.domain.ClobDomain " in the UI.

Such as below -

I found this issue occurs when we are having an attribute of type Clob in DB and and we use it in UI as an Input text or Rich text Editor which support String as a default.

The issue got resolved by adding a converter="oracle.genericDomain" attribute in the text field.

Sample code :

<af:richTextEditor value="#{bindings.test.inputValue}"
                  id="it1" converter="oracle.genericDomain">

  *Comments and feedback are most welcomed, Thanks.


  1. Be careful using oracle.genericDomain as the converter. It works, but even if you leave the field blank, it creates 0-length CLOB objects in the CLOB column. These are different than truly 'null' values. (They take up space, etc.)

    To only create a CLOB object for a CLOB column if there is actually data, write your own "ClobConverter" class. See

    1. Hi Karl,

      Thanks for your great info and reply... hope your solution will give more elaborate view on the usage of CLOB to the viewers.

      I would like to share an interesting link for the users to understand more about clob as null -