It would be much easier to help you if you could provide the actual stack trace 
you are seeing.
More comments inline.

On 26. juni 2014, at 08:08, china_wang <2596121...@qq.com> wrote:

> Dear All,
> 
>      I have a problem that i can't get Clob  when i use
> spring3.0.5+ibatis2.3.0+derby10.10.0.1 ,
> my code snippets :
> 
> 
> <select id="PUB-DATASETS" resultClass="java.util.HashMap"
> parameterClass="map" remapResults="true">
>               
>        select $columns$ from pub_datasets where 1=1
>        <dynamic prepend="and">
>                               <isNotEmpty property="dataSoursIds">            
>                           
>                                DATASOURCE_ID in ($dataSoursIds$) 
>                               </isNotEmpty>                           
>               </dynamic>             
>        <dynamic prepend="and">
>                               <isNotEmpty property="dataSetIds">              
>                   
>                                DATASET_ID in ($dataSetIds$)
>                               </isNotEmpty>                           
>               </dynamic>
> </select>
> 
> 
> 
> ArrayList<Map&lt;String, Object>> list =new
> ArrayList<Map&lt;String,Object>>();

This looks unnecessary. The ArrayList created here goes out of scope in the 
next line.

>       
> list =(ArrayList)
> datasetDAO.findAll("MS-PUB-DATASETS-SELECT-ALL-BY-ADMIN",params);

If this does not throw, I assume that the database access was ok…

> for(Map<String, Object> map:list)
> {
>       if(map.get("TEMPLATE")!=null)
>       {
>         System.out.println(((Clob)map.get("TEMPLATE")).length());
>       }
> }
> 
> "((Clob)map.get("TEMPLATE")).length() " will throw exception….

Right, but there could be many reasons. Which exception did you see?

Regards,

Dyre

Reply via email to