seemarich Posted February 28, 2011 Share Posted February 28, 2011 hi,We deployed our application in Tomcat 6.0 in a Ubuntu (10.0.4) environment. Java version is OpenJDK (Java 6). In the server startup, java.awt.headless property is set to true. We are using Jasper Reports version 3.7.6. However, when we generate a Jasper report, we get the error "NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser". The Jasper jar is in the WEB-INF/lib folder. The same war file is working fine in our local tomcat deployment.Is there any compatibility issue for Jasper Reports with any of the above mentioned environments? Is there any setting we need to enable? Thanks,Seema Code: Code:Caused by: java.lang.NoClassDefFoundError: Could not initialize classnet.sf.jasperreports.engine.util.JRStyledTextParser atnet.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:182) atnet.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) atnet.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87) atnet.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57) atnet.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142) atnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:78) atnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624) atPost Edited by seemarich at 02/28/2011 10:06 Link to comment Share on other sites More sharing options...
ernestoo Posted February 28, 2011 Share Posted February 28, 2011 Hi, please repost this in the JasperServer forum, not the Jasper Reports forum (http://jasperforge.org/projects/jasperserver/forum/) Link to comment Share on other sites More sharing options...
seemarich Posted February 28, 2011 Author Share Posted February 28, 2011 hi,We are not using Jasper Server. Our error occurs when generating a Jasper Report. Thanks,Seema Link to comment Share on other sites More sharing options...
ernestoo Posted February 28, 2011 Share Posted February 28, 2011 Right - sorry Seema!If you try to deploy the sample application (../demo/samples/webapp) do you get the same behavior?Are you using the packaged version of Tomcat in Ubuntu? Where are you setting the headless setting? I think it's /etc/default/tomcat6 Link to comment Share on other sites More sharing options...
seemarich Posted March 1, 2011 Author Share Posted March 1, 2011 hi,We managed to resolve the issue.We did the following.1. Switched from Open JDK to Sun JDK2. Installed MS Core Fonts3. Packaged JasperReport font library jar with the application Thanks for the support. -Seema 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