I have DAO function that calls DB procedure using SimpleJdbcCall. However i am unable to read the CLOB data returned from stored procedure. When i try to do a .toString() on the returned CLOB value ( result.get("OUT_RTN_XML") ), I just get this in the string : oracle.sql.CLOB@f762282a
Below is the code snippet.
SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(jdbcTemplate);
simpleJdbcCall.withSchemaName(_properties.getPropertyValue("schemaName"));
simpleJdbcCall.withCatalogName(_properties.getPropertyValue("packageName"));
simpleJdbcCall.withProcedureName(_properties.getPropertyValue("procedureName"));
try {
SqlParameterSource sqlParameterSource = new MapSqlParameterSource()
.addValue("P_INPUT", input);
Map<String, Object> result = simpleJdbcCall.execute(sqlParameterSource);
if(result.get("OUT_RTN_XML") != null) {
rtnXml = result.get("OUT_RTN_XML").toString();
}
} catch(Exception e) {
e.printStackTrace();
}