JasperReports NoClassDefFoundError exception on net.sf.jasperreports.engine.util.JRStyledTextParser
Finally, I've got it working. I detected the root Exception, which was thrown before NoClassDefFoundError:net/sf/jasperreports/engine/util/JRStyledTextParser :
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
The Sun AWT classes on Unix and Linux have a dependence on the X Window System. When you use these classes, they expect to load X client libraries and be able to talk to an X display server. This makes sense if your client has a GUI; unfortunately, it's required even if your client uses AWT but does not have a GUI (which is my case, generating a report from a web application)
The way to bypass this, is setting a system property java.awt.headless=true
on system startup.
I experienced the same issue and we've solved it by installing the xorg fonts packages along with the ttf fonts.
Text Parsing Exception means the font not have been recognized. I spent an whole day trying to understand why, then finally I fix this problem using text SansSerif. On Linux only a few font can be parsed. Hoping has helped, best regards