This discussion is archived
9 Replies Latest reply: Jan 29, 2013 10:28 AM by user104461953 RSS

Cannot display the actual value of ClobDomain variable in jspx

user10403036 Newbie
Currently Being Moderated
I have a custom table and three of its fields/columns are of type Clob and they contain xml data. To populate this table I used ADF Business Component and in my application these fields are defined as ClobDomain. Inserting records to this table works fine. When testing my application module or business component, actual data is displaying. However, when retrieving these data in my page, it is being displayed as wrapped object like weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB instead on the actual value.

I tried to use the converter in my jspx and created ClobConverter class which implements Converter with the following code;

public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException {
Reader clobReader = newClob.getCharacterStream();
char[] buffer = new char[1000];
StringBuffer sb = new StringBuffer();
int nchars = 0;
try {
while( (nchars = clobReader.read(buffer)) != -1 )
// Read characters from Clob into buffer
sb.append(buffer, 0, nchars);

// Transfer character to StringBuffer from buffer
System.out.println("sb.toString(): "+sb.toString());
clobReader.close();
strClob = sb.toString();
} catch (Exception e) {               
System.out.println("Error Encountered."+e);
}
return strClob;
}

But even this doesn't help resolve the issue.

Below are the details of my system:
- Oracle DB Version = 10.2.0.4
- Weblogic Server Version = 10.3.0.0
- OSB Version = 10.3.1.0

Please advise how to fix these problem.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points