Error while running Jasper Report using Apache Tomcat 7 in Windows

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Error while running Jasper Report using Apache Tomcat 7 in Windows



I have configured compiling Jasper Report in JSP page. I have done in connecting to database, collecting the JRXML file as well as the parameters for the report and given in below:


JasperDesign jasperDesign = JRXmlLoader.load(reportFile);
jasperDesign.setLanguage(language);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, jasperParameter, jdbcConnection); //line4



While the report is generating I get error in line 4.


line 4



What I get is:


exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
javax.servlet.ServletException: java.lang.ExceptionInInitializerError
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:930)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:863)
org.apache.jsp.QuaLIS.jasperReport_jsp._jspService(jasperReport_jsp.java:488)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ExceptionInInitializerError
net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153)
net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:55)
net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:849)
org.apache.jsp.QuaLIS.jasperReport_jsp._jspService(jasperReport_jsp.java:444)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)



also says


java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser



To brief you what i have done is:



Looking forward for a solution. Thanks in advance!!!





Post the full stack trace. It looks like a JAR file is missing from the CLASSPATH.
– Dave Jarvis
Aug 10 at 15:40





I read it as headless problem, probably it can't init the graphics context.
– Petter Friberg
Aug 10 at 19:34





@Alex K, let me tell one more thing. Exactly the same set of deployment exists in another server which was copied from THE server which throws error, but the other server deployment works fine. Totally strange. Could there be any other cause for this problem. Considering you to remove the mark Duplicate and open the question again.
– Ash Win
Aug 11 at 5:59






@PetterFriberg the headless problem was for other working environment like Linux,Unix. What i am using is Windows Server 2008. And yes i have also tried the headless and didn't work. Also mentioned it in a note of what all I have tried.
– Ash Win
Aug 11 at 6:02





@AshWin the second dupe is good, try the solutions on that one also temp folder
– Petter Friberg
Aug 11 at 8:16









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard