We upgrading the our application to Java 17 (from Java 8) and Jasper to 6.20.0 (from 6.0.3). During this upgrade Jasper reports getting failed with the two exceptions. The fonts is already exported and used as an extension jar which was working fine with java 8 and jasper 6.0.3. But once the upgrade is done, following given exceptions occurs.
OS : red hat linux 7.9
tomcat : jws 5.4 (-Djava.awt.headless=true)
jdk : Oracle Java 17
"Caused by: java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null"
Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser.
Tried on following resolutions but failed with them
the problem is with Java :)
We solved it, by copying the folder and file from the old JDK.
Make copy from JDK8/jre/lib :
To JDK17/lib
BR Jan V.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With