Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Java Excel Report Postprocessor - NullPointerException Error

Hi Everyone,

I have a Postprocessor java class that I expect is causing the NullPointerException  error because the Preprocessor worked 100%.

The problem is that the error message does not guide you properly. In other errors I could determine the row in the java class that is causing the error but not this error.

The error message from the server log file, message directly after the service was restarted:

STATUS server:main:(PPMTomcatMonitor.java:56):2020/03/16-19:52:45.638 SAST: *** Ready!
STATUS JSESSIONID=214D19E0A98E88DBDE448F19368B5923.dev,USERNAME= server:http-bio-8080-exec-1:(CryptixProperties.java:535):2020/03/16-19:53:32.474 SAST: Warning: failed to load the Cryptix properties file.
Make sure that the CLASSPATH entry for Cryptix is an absolute path.
ERROR :CommandRunner for com.kintana.rpt.server.KSCRunExcelReportCommand Batch ID: 35328:(KSCRunExcelReportCommand.java:306):2020/03/16-19:53:49.658 SAST: Error while running Excel Report with template epmo/EPMOPortfolioDashboardTemplateV1.xlsx
at org.apache.poi.xssf.usermodel.XSSFRow.removeCell(XSSFRow.java:491)
at com.mercury.itg.common.excel.service.ExcelExportServiceImpl.trimEmptyTrailingCellsAndReturnLastRow(ExcelExportServiceImpl.java:177)
at com.mercury.itg.common.excel.service.ExcelExportServiceImpl.findLargeDataInfo(ExcelExportServiceImpl.java:447)
at com.mercury.itg.common.excel.service.ExcelExportServiceImpl.generateDynamicStreamingExcelWorkbook(ExcelExportServiceImpl.java:387)
at com.mercury.itg.common.excel.exporter.ExcelReportExcelExporter.generateWorkbook(ExcelReportExcelExporter.java:35)
at com.kintana.rpt.server.KSCRunExcelReportCommand.execute(KSCRunExcelReportCommand.java:264)
at com.kintana.core.server.execution.CommandRunner.run(CommandRunner.java:120)
at java.lang.Thread.run(Thread.java:748)

The post processor class needs to remove the zero's from the table section which it has done but but I started at the wrong row and cell number, I fixed that in the java code and that change started the error message. I reverted back but error keeps on being the same.:

Excel Spreadsheet screenshot, excel file attached

Annotation 2020-03-1.jpg

The Java source code file attached in zip file

Any ideas on what I can do to understand where the error occurred?



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.