I am getting an exception( Exception in thread "main" java.lang.ClassCastException: net.sf.jasperreports.engine.data.JRBeanCollectionDataSource cannot be cast to java.lang.Boolean ) while creating a report(Bar Grap) in iReport. I am passing JRBeanCollectionDataSource object through map as follow. 1st I have created POJO class then created object of that POJO class inserted them in a list. Then created JRBeanCollectionDataSource from that list as follow JRBeanCollectionDataSource chartDataSource = new JRBeanCollectionDataSource(list); and passing that parameter through hashmap HashMap<String, Object> parameters = new HashMap<String, Object>(); parameters.put("chartDataSource", chartDataSource); In iReports I have created parameter with name="chartDataSource" and type="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource" created fields as created in the POJO (All fields are of String type). But while generating Graph in iReport getting exception "Exception in thread "main" java.lang.ClassCastException: net.sf.jasperreports.engine.data.JRBeanCollectionDataSource cannot be cast to java.lang.Boolean " Please help.