In our application we are having a simple POJO class that has a Clob attribute within it.
I am having issue in getting the String representation of that Clob entity.
Say I have already queried and cached the result in the POJO object, now I am trying to get the String value of the Clob as below.
int aLength = (int)myPojo.getClobField().length();
String aStringValue = myPojo.getClobField().getSubString(1L, aLength);
But the above execution gives me the error,
com.ibm.db2.jcc.am.SqlException: [jcc][10120][11936][4.14.88] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null
Am I missing something?