I've been pulling my hair out for the last 2 days (what's left of it).

I use CGIDEV2 and HSSFCGI extensively to generate Excel spreadsheets. Been doing it for years.
Started having issues yesterday with one of our reports - XLSXGEN just "hung". After looking at it, the temporary XML file I write using CGIDEV2, I could see that the end of the file contained garbage characters followed by data from the beginning of the file. This only occurred when generating the Excel over a particular set of data.

Down the rabbit hole I went...

I've since downloaded and installed new versions of CGIDEV2 and HSSFCGI... it didn't hang like before. Instead, it produced the XLSX output with odd data in the last 4 cells. The XML output still looks the same as before ("corrupted" in the same way). Again, this is only over a particular set of data.

Down the rabbit hole even further...

Years ago Giovanni told me (in an email) that when using CGIDEV2 and WrtStmfToHTML() could encounter memory issues (i.e. writing the htmlbuffer all at once). At that time I "converted" some reports to use WrtSectionToStmf() - writing each section at a time instead (chunk method).

Thinking I could have encountered a similar issue, I converted this program (service program) to all me to use either method. When using the chunk method, it's writing out the XML temp file successfully. But I now get an error running XLSXGEN (see below).
If I run the same report using the same service program in the previous "mode" (using WrtSection), XLSXGEN works fine over all data sets (except my original issue).

The following error appears twice in the joblog:

Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 11/21/25 Time sent . . . . . . : 11:43:46

Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure SS_TEXT in program HSSFCGI/HSSFR4_2 received
Java exception "java.lang.NullPointerException:" when calling method
"createCell" with signature "(I)Lorg.apache.poi.ss.usermodel.Cell;" in class
"org.apache.poi.ss.usermodel.Row".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Technical description . . . . . . . . : If the exception indicates that the
Java class was not found, ensure the class for the method is in the class
path. If the exception indicates that the Java method was not found, check
the method name and signature. If the signature is not correct, change the
RPG prototype for the method, or change the Java method, so that the return

I am at my wits end.

Any suggestions?
[Logo]<https://www.totalbizfulfillment.com/> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.