mizan_1 Posted April 29, 2014 Posted April 29, 2014 Class Cast Exception while trying to peform decsending order on table column with double data type in the report. Report table column contains double data type. Clicked on the "down" arrow to see data descending or der and getting below error. It appers this descding order function is looking for integer type. But my field type is double. How to get around to this issue.Error Messagejava.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.IntegerError Tracejava.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer at java.lang.Integer.compareTo(Integer.java:52) at net.sf.jasperreports.engine.fill.DataSourceComparator.compare(DatasetSortUtil.java:271) at net.sf.jasperreports.engine.fill.DataSourceComparator.compare(DatasetSortUtil.java:225) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:324) at java.util.TimSort.sort(TimSort.java:203) at java.util.TimSort.sort(TimSort.java:173) at java.util.Arrays.sort(Arrays.java:659) at net.sf.jasperreports.engine.fill.DatasetSortUtil.getSortedDataSource(DatasetSortUtil.java:121) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1281) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:900) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:651) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now