technologist.kj Posted November 5, 2012 Share Posted November 5, 2012 I'm using JRBeanCollectionDatasource with Jasper server. I could test the datasource successfully by providing "beanIdInSpring" and "getMycollection" as the bean and function name in the add new datasource page.The "getMyCollection" function inside the bean returns and arraylist of class "MyBean".Although such a setup works well in IReport, when I try to view this in Jasper Server I get this error -java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.jaspersoft.jasperserver.api.metadata.jasperreports.service.ReportDataSourceService at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.BeanReportDataSourceServiceFactory.createService(BeanReportDataSourceServiceFactory.java:89) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.createDataSourceService(EngineServiceImpl.java:710) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:655) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:356) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:788) at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:60) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:288) at com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:329) at com.jaspersoft.jasperserver.war.action.ViewReportAction.verifyData(ViewReportAction.java:222) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.webflow.util.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:103) at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:136) Link to comment Share on other sites More sharing options...
kavi_mathi Posted March 25, 2014 Share Posted March 25, 2014 Any update reg this? Link to comment Share on other sites More sharing options...
Solution technologist.kj Posted March 25, 2014 Author Solution Share Posted March 25, 2014 Figured out that the concept of a "datasource" is different in iReport UI and jasperServer. Please follow this tutorial to create a custom query executor in jasper server. Link to comment Share on other sites More sharing options...
technologist.kj Posted March 25, 2014 Author Share Posted March 25, 2014 updated as answer. Link to comment Share on other sites More sharing options...
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