Akshay Jadhav Posted October 11, 2012 Share Posted October 11, 2012 I put *.jasper* file in my web content folder of my project and in my action class there is only execute method and my *struts.xml* has following code: <!-- language: lang-xml --> <action name="myJasperTest" class="com.acme.test.action.JasperAction"> <result name="success" type="jasper"> <param name="location">/our_jasper_template.jasper</param> <param name="dataSource">myList</param> <param name="reportParameters">reportParams</param> <param name="format">PDF</param> </result> <result name="error">/Error.jsp</result> </action> And while running this program it gives me error: java.lang.ClassCastException: cannot assign instance of net.sf.jasperreports.engine.base.JRBaseStyle to field net.sf.jasperreports.engine.base.JRBaseParagraph.paragraphContainer of type net.sf.jasperreports.engine.JRParagraphContainer in instance of net.sf.jasperreports.engine.base.JRBaseParagraph Can anybody help me how to resolve this problem? Link to comment Share on other sites More sharing options...
Solution Akshay Jadhav Posted October 11, 2012 Author Solution Share Posted October 11, 2012 This error occur due to improper jars in projects lib folder. Link to comment Share on other sites More sharing options...
AhmadNasrElKaffas Posted December 24, 2012 Share Posted December 24, 2012 The Jar files in the projects lib folder should be matching the version of iReport I had the same problem and it has been solved by using correct jar files. you can take a look at the link below: http://sourceforge.net/projects/jasperreports/files/jasperreports/ 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