Jump to content

JRException: Errors encounterd when compiling


rkozlowski

Recommended Posts

 

 

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 Map

parameter_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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...