HiI have created a jrxml and subsequently a jasper file using iReports. The report also comes nicely in the iReports Execute using active connection mode. However, when i try to incorporate this jasper file into my project ( I am using Oracle JDev 9.0.5 on Windows XP ), i get the error as mentioned in the attached error file.
My Source code is also attached. Pls help. thanks Manish -- - Imagination is more important than knowledge. -- Albert Einstein
06/03/30 12:38:12 Hibernate: select payroll0_.payrollid as payrollid, payroll0_.date as date9_, payroll0_.startday as startday9_, payroll0_.endday as endday9_, payroll0_.hoursworked as hourswor5_9_, payroll0_.grosspay as grosspay9_, payroll0_.deductions as deductions9_, payroll0_.netpay as netpay9_, payroll0_.empid as empid9_ from payroll payroll0_ 06/03/30 12:38:15 java.lang.NoSuchMethodException: Unknown property 'empid' 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:800) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:986) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:428) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:409) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:257) 06/03/30 12:38:15 at com.cde.payroll.Common.actions.GenPayrollReportAction.execute(GenPayrollReportAction.java:68) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 06/03/30 12:38:15 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) 06/03/30 12:38:15 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 06/03/30 12:38:15 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 06/03/30 12:38:15 at java.lang.Thread.run(Thread.java:534) 06/03/30 12:38:15 NESTED BY : 06/03/30 12:38:15 java.lang.NoSuchMethodException: Unknown property 'empid' 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:800) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:986) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:428) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:409) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:257) 06/03/30 12:38:15 at com.cde.payroll.Common.actions.GenPayrollReportAction.execute(GenPayrollReportAction.java:68) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 06/03/30 12:38:15 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) 06/03/30 12:38:15 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 06/03/30 12:38:15 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 06/03/30 12:38:15 at java.lang.Thread.run(Thread.java:534) 06/03/30 12:38:15 NESTED BY : 06/03/30 12:38:15 net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : empid 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:116) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:800) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:986) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:428) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:409) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:257) 06/03/30 12:38:15 at com.cde.payroll.Common.actions.GenPayrollReportAction.execute(GenPayrollReportAction.java:68) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 06/03/30 12:38:15 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) 06/03/30 12:38:15 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 06/03/30 12:38:15 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 06/03/30 12:38:15 at java.lang.Thread.run(Thread.java:534) 06/03/30 12:38:15 Caused by: java.lang.NoSuchMethodException: Unknown property 'empid' 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:104) 06/03/30 12:38:15 ... 25 more
/* imports and class definitions */ response.setContentType("application/pdf"); Map parameters = new HashMap(); ArrayList outList = null; myBPOP objectBPOP = new myBPOP(); String filePath = ""; outList = objectBPOP.view(); filePath = "/WEB-INF/classes/report.jasper"; try { byte[] bytes = JasperRunManager.runReportToPdf(new FileInputStream( new File(getServlet().getServletContext().getRealPath(filePath))), parameters, new JRBeanCollectionDataSource(outList)); response.setContentLength(bytes.length); response.getOutputStream().write(bytes, 0, bytes.length); } catch (Exception e) { e.printStackTrace(); } return mapping.findForward("genPayrollReportSuccess");