4

We are using Java 11 and compared to earlier versions of Java ,Java 11 have removed fonts folder from jre/lib. So our poi calls are failing at createsheet call,due to missing fontconfig. If we install fontconfig using yum ,it will work like charm.But management is not approving the same. Issue is not happening in Java8 as fonts are identified from jre/lib folder. Tried to put the fonts in current working directory ,but that also didnot help us. Can anyone let me know ,how poi picks up the fonts,from where and what I can do to overcome this issue.Also the list of fonts/files to get over the issue.

Regards, Rakhi

Rakhi
  • 59
  • 2
  • 2
    Poi relies on the Java runtime to handle fonts. This looks like a duplicate of issues like https://stackoverflow.com/questions/43096782/apachepoi-fails-with-font-error-on-openjdk-1-8-0-121-okay-on-oracle-jre – PJ Fanning Aug 06 '21 at 07:17
  • Can you add the full stacktrace of where it fails? – centic Aug 06 '21 at 08:31
  • in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6 #10 0x00007fbd888b3a06 in ?? () from /lib64/libstdc++.so.6 #11 0x00007fbd888b3a33 in std::terminate() () from /lib64/libstdc++.so.6 #12 0x00007fbd888b3c53 in __cxa_throw () from /lib64/libstdc++.so.6 #13 0x00007fbd941de436 in PSJNI::JavaObject::CallVoidMethod(std::string const&, std::string const&, ...) const () from /opt/oracle/psft/pt/tools/bin/libpsjni.so #14 0x00007fbd93780b5e in CPSSpreadSheet::CreateSheet(wchar_t const*This didnot confirm issue is related to font,but worked with fontconfig – Rakhi Aug 06 '21 at 10:29
  • Have a look at https://wiki.archlinux.org/title/Java_Runtime_Environment_fonts (Font Selection and See Also sections) – PJ Fanning Aug 07 '21 at 09:11
  • 1
    @Rakhi did you find any fix? – daph111 Jun 01 '22 at 12:15

0 Answers0