haideralikhan Posted August 11, 2010 Share Posted August 11, 2010 I develop a report (having 4 subreport ), it is working fine form iReport designer but when i put it into j2ee container its throw blow Exception . Actually i analysis the problem when i attached the sub report it throw blow exception. -Fill 8159170: created for main-Error in servlet-javax.servlet.ServletException: Error in servlet- at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:759)- at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)- at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:287)- at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)- at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)- at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)- at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)- at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1033)- at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:436)- at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)- at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)- at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)- at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)- at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)- at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)- at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)- at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129)- at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)- at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) Link to comment Share on other sites More sharing options...
jasperforum Posted August 11, 2010 Share Posted August 11, 2010 attach the servlet Link to comment Share on other sites More sharing options...
haideralikhan Posted August 13, 2010 Author Share Posted August 13, 2010 the single report is working fine, but not subreport Is there any "privilege" or accessing issue ?Code: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { Map parameters = request.getParameterMap(); boolean recordPageDisplayFlag = false; String[] reportType = (String[]) parameters.get("reportType"); //Some time we need report format (without data) String[] noRecordPageDisplayFlag = (String[]) parameters.get("noRecordPageDisplayFlag"); JasperPrint jasperPrint = generateReportMgr.getReport(Integer.parseInt(reportType[0]), parameters); response.setContentType("application/pdf"); ServletOutputStream outStream = response.getOutputStream(); JRPdfExporter exporter = new JRPdfExporter(); exporter.setParameter(JRPdfExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM, outStream); exporter.exportReport(); outStream.flush(); outStream.close(); return null; } catch (Exception e) { e.printStackTrace(); logger.error(e.getMessage()); return mapping.findForward("errorPage"); } } Link to comment Share on other sites More sharing options...
lucianc Posted August 14, 2010 Share Posted August 14, 2010 Do you have a full exception stacktrace (including Caused by..)?Regards,Lucian 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