Search code examples
apache-poixlsx

sxssf-workbook-createsheet-fails-on-linux-environment (OEL 8.5), Solaris 11.4


SXSSFWorkbook workbook.createSheet() method fails on a linux-environment(OEL 8.5) without throwing any kind of meaningful error (it's just hanging).

Strangely, the same method on the XSSFWorkbook createSheet class works fine. Below are the snippets of code. Has anyone experienced a similar issue before?

final SXSSFWorkbook workbook = new SXSSFWorkbook(new XSSFWorkbook(), 100, true, true);
workbook.setCompressTempFiles(true);
Sheet sheet = workbook.createSheet("Sheet 1"); //this method fails

final XSSFWorkbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet("Sheet 1"); // this works fine

we are using the apache POI 4.1.2 version. This same code is working fine in windows environment. verified the fonts below, they are already installed. Any idea what is missing in Linux environment please let me know. Any pointers (OR) any logs in the Linux where we can get more details, please share.

sudo apt-get update sudo apt-get install fontconfig


Solution

  • Setting the -Djava.io.tmpdir=/u01/tmp -Djava.awt.headless=true to the weblogic start params fixed this issue.

    Please make sure to give full permissions to the /u01/tmp dir.