jasper reports - Tomcat: JRStyledTextParser not Initialized. java.awt is set to true -
i keep getting java.lang.noclassdeffounderror: not initialize class net.sf.jasperreports.engine.util.jrstyledtextparser
the full stacktrace is:
java.lang.noclassdeffounderror: not initialize class net.sf.jasperreports.engine.util.jrstyledtextparser net.sf.jasperreports.engine.fill.jrbasefiller.<init>(jrbasefiller.java:108) net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:69) net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:57) net.sf.jasperreports.engine.fill.jrfiller.createbandreportfiller(jrfiller.java:200) net.sf.jasperreports.engine.fill.jrfiller.createreportfiller(jrfiller.java:215) net.sf.jasperreports.engine.fill.jrfiller.fill(jrfiller.java:115) net.sf.jasperreports.engine.jasperfillmanager.fill(jasperfillmanager.java:583) net.sf.jasperreports.engine.jasperrunmanager.runtopdf(jasperrunmanager.java:455) net.sf.jasperreports.engine.jasperrunmanager.runreporttopdf(jasperrunmanager.java:870) com.evnica.interop.main.reportservlet.createreport(reportservlet.java:119) com.evnica.interop.main.reportservlet.doget(reportservlet.java:96) com.evnica.interop.main.reportservlet.service(reportservlet.java:79) javax.servlet.http.httpservlet.service(httpservlet.java:729)
i have searched solution , found bunch.
- could not initialize class net.sf.jasperreports.engine.util.jrstyledtextparser
- jasperreports noclassdeffounderror exception on net.sf.jasperreports.engine.util.jrstyledtextparser
and 10 more (this first question can't enlist them all).
i have tried:
- to set
java.awt.headless=true
.
i did within code:
static { system.setproperty("java.awt.headless", "true"); system.out.println(java.awt.graphicsenvironment.isheadless()); }
(returns true expected).
i did in jvm options:
i set catalina_opts -djava.awt.headless=true
. echoes expected.
it didn't help.
i tested with.jrxml dejavu sans , included jasperreports-fonts-6.2.2.jar in path, , tested sans serif. checked fonts available jvm , tested them. no success.
there suggestions check versions of jasperreports jars - checked too. have jars of 6.2.2. version:
jasperreports-6.2.2.jar, jasperreports-fonts-6.2.2.jar, jasperreports-javaflow-6.2.2.jar.
i use joda-time-2.9.3 (have no idea how it's connected problem, 1 advice use joda; used beginning anyway), project sdk java 1.8.0_51 (there advice update 8 - not relevant use it), , tomcat ok (the absent work folder caused similar problem in 1 of cases).
what missing?
edit: while debugging came method initializegrophenv() in jrgraphenvinitializer class, throws util.graphic.environment.initialization.error:
available_font_face_names.addall(arrays.aslist(graphicsenvironment.getlocalgraphicsenvironment().getavailablefontfamilynames()));
it's interesting method getavailablefontfamilynames() in sungraphicsenvironment returns valid array of 274 elements (printscreen debugger under link):
first of all, help. responded fast, , made me dig deeper =) problem solved.
my error have both jasperreports-6.2.2.jar
, jasperreports-javaflow-6.2.2.jar
in libraries. remember, last method in stack trace initialization of jrbasefiller
. presence of 2 jars caused conflict, both contain package net.sf.jasperreports.engine.fill
jrbasefiller
class in it.
i left jasperreports-javaflow-6.2.2.jar
only. didn't work on own. added 2 more libraries: jfreechart-1.0.19.jar
(previous versions didn't contain needed classes) , jcommon-1.0.8
. java.lang.noclassdeffounderror
gone.
Comments
Post a Comment