dayana Posted July 10, 2009 Share Posted July 10, 2009 hi,i am getting the following error when i am tring to pass a list as a parameterException in thread "main"java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.math.BigDecimal java :- ArrayList lst=new ArrayList(); lst.add(sum1); lst.add(sum2); lst.add(sum3); lst.add(sum4); parameters.put( "li", lst );jrxml :-<parameter name="li" isForPrompting="false" class="java.util.List"/> Post Edited by dayana at 07/10/2009 05:36 Link to comment Share on other sites More sharing options...
teodord Posted July 11, 2009 Share Posted July 11, 2009 Hi, You did not post the entire stack trace, so we cannot tell from where it is actually raised. You must be doing something with that parameter in the report, and that would be the cause. You use it in some other expressions.Post the entire JRXML. Thanks,Teodor Link to comment Share on other sites More sharing options...
dayana Posted July 13, 2009 Author Share Posted July 13, 2009 hi, thank u for your reply......i am not using that list anywhere in my jrxml,i am just declaring it....then only i am getting this error....... Link to comment Share on other sites More sharing options...
teodord Posted July 13, 2009 Share Posted July 13, 2009 Hi, If you don't post the JRXML, we cannot help you. If you say you are sure about what you are doing, then I'm sure you cand find the problem yourself. Thanks,Teodor Link to comment Share on other sites More sharing options...
dayana Posted July 13, 2009 Author Share Posted July 13, 2009 hi,i have attached my jrxml, my actual problem is that i want to draw a chart from a complex dataset,which will be passed as a parameter from java. please help me to pass the dataset from javacode to jasper file :(Post Edited by dayana at 07/13/2009 10:20 Link to comment Share on other sites More sharing options...
teodord Posted July 13, 2009 Share Posted July 13, 2009 I thought your problem was with a cast exception when you pass a list parameter.Now you tell me you have a different problem? Why don't you create a new thread for that????And this JRXML you posted... what should I do with it? Where is this "li" parameter of type java.util.List that you said you have??If you mess up the forum postings like this... no wonder the reports are not working... Thanks,Teodor Post Edited by teodord at 07/13/2009 11:18 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