Hi All; I am facing problem while compiling JasperReport.
I have project running under jdk1.4 and jasper-0.5 and tomcat4.1. I am able to compile all report under this environment and running well. I want to migrate this project to jdk1.5. Now the problem is i am not able to compile my reports in jdk1.5 and tomcat5.5 environment. I have written some user defined classes like DbUtil, JasperParameters and SimpleNumberFormat to use in jrxml files. Not when i compile my project it compiles all the classes. But when i run "ant jasper" to compile all jrxml files to jasper it gives me error like [java] file name: SummaryContributionAnalysis.xml [java] 1 error [java] jasper compile for: SummaryContributionAnalysis.xml [java] at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstra ctCompiler.java:193) [java] at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompile Manager.java:219) [java] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperC ompileManager.java:135) [java] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperC ompileManager.java:94) [java] at com.applied.fincrm.utils.JasperCompiler.main(JasperCompiler.java:155) [java] net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: [java] C:workfincrmNewSummaryContributionAnalysis_1227504311234_289722.java:253: cannot access com.applied.fincrm.utils.Ja ChartFactory [java] bad class file: C:\Tomcat5.5\webapps\fincrm\WEB-INF\classes\com\applied\fincrm\utils\JasperC hartFactory.class [java] class file has wrong version 49.0, should be 48.0 [java] Please remove or make sure it appears in the correct subdirectory of the classpath. [java] value = (net.sf.jasperreports.engine.JRRenderable)((new net.sf.jasperreports.renderers.JCommonDrawabl derer (com.applied.fincrm.utils.JasperChartFactory.createVerticalBarChart("", "", "Contribution", ((org.jfree.data.category.De tCategoryDataset)variable_ChartContribution.getValue()), true,false,false))));//$JR_EXPR_ID=20$ [java] ^ [java] 1 error The class JasperChartFactory contains method used to create chart and being reffered from jrxml file. All these classes are compiled under jdk1.5. Also, I am able to compile some of the reports. But it is not compiling reports having reference to compiled class as shown in above error as above JapserChartFactory class. Can anybody say what would be the issue? how can i compile these reports to run under jdk1.5 and tomcat5.5?? regards, Rajil Davda