rkozlowski Posted April 9, 2009 Share Posted April 9, 2009 The message says that the class with the very long name extends JREvaluator -- which must be an abstract class because it has an abstract method (or it inherits but does not implement an interface method) named customizedInit() that takes three Map arguments. Therefore either the class with the very long name must also be marked 'abstract", or it must implement that method and I cannot figure out how to fix this error. The line of code that it is occuring on is: JasperReport reportObj = JasperCompileManager.compileReport(reportDesignObj); net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The type Lowest32Percent32of32Patients32with32Hemoglobin3210460451046932g47dL_1239290426891_874228 must implement the inherited abstract method JREvaluator.customizedInit(Map, Map, Map)public class Lowest32Percent32of32Patients32with32Hemoglobin3210460451046932g47dL_1239290426891_874228 extends JREvaluator<--------------------------------------------------------------------------------------->2. The method get(String) is undefined for the type Mapparameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");Code: public static JasperPrint compileNFillReportData(JasperDesign reportDesignObj, HashMap<String, Object> reportParametersMap) { JasperPrint reportPrintObj = null; try { int nWidth = 0; if (reportDesignObj.getPageHeight() > reportDesignObj.getPageWidth()){ nWidth = reportDesignObj.getPageHeight() + 5; reportDesignObj.setPageWidth(nWidth); } //Compile the report JasperReport reportObj = JasperCompileManager.compileReport(reportDesignObj); //Fill the report reportPrintObj = JasperFillManager.fillReport(reportObj, reportParametersMap, new JREmptyDataSource()); } catch (Exception e) { logger.error("There was an error trying to compile and fill the report ...", e); } //Return the JasperPrint object return reportPrintObj; } Link to comment Share on other sites More sharing options...
lucianc Posted April 10, 2009 Share Posted April 10, 2009 Something is wrong in your environment, but I don't know what.You could try setting the net.sf.jasperreports.compiler.keep.java.file and net.sf.jasperreports.compiler.temp.dir properties to check whether the expression evaluator classes that JR creates for the report look fine or not.Regards,Lucian Link to comment Share on other sites More sharing options...
rkozlowski Posted April 10, 2009 Author Share Posted April 10, 2009 Solution-Reinstall Tomcat and then go into Catalinalocalhost and make sure docBase is correct. Also go into Eclipse and make sure that Tomcat settings are correct.My problem was caused by copying all of my coworker's jars into my Tomcat commonlib and overwriting the jars that were already there. 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