search cancel

Unable to generate PDF with embedded graph - error with phantomjs.exe

book

Article ID: 255650

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

Created a report in CABI and that report is erroring out with the following error in the C:\Program Files (x86)\Nimsoft\probes\service\wasp\webapps\cabijs\WEB-INF\logs\jasperserver.log file:

2022-11-29T17:18:05,373 ERROR SecureExceptionHandlerImpl,pool-18-thread-1:125 - There was an error on the server. Try again or contact site administrators. (Error UID: 1ac4a3f8-7e72-4adb-ae1b-a846446c60f3) com.jaspersoft.jasperserver.remote.exception.ExportExecutionRejectedException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Cannot run program "C:\Program Files (x86)\Nimsoft\probes\service\wasp\webapps\cabijs\WEB-INF\phantomjs-2.1.1\bin\phantomjs.exe" (in directory "C:\Users\ADMINI~1\AppData\Local\Temp"): CreateProcess error=2 
    at com.jaspersoft.jasperserver.remote.services.impl.ReportExecutorImpl.exportReport(ReportExecutorImpl.java:202)
    at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.generateReportOutput(RunReportServiceImpl.java:1162)
    at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.executeExport(RunReportServiceImpl.java:615)
    at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl$2.run(RunReportServiceImpl.java:507)
    at com.jaspersoft.jasperserver.api.logging.util.LoggableExecutorService$1.run(LoggableExecutorService.java:84)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)

Environment

Release : 20.4
Component: cabi 8.0

Cause

path to ../phantomjs.exe is not correct in the following files:

..\Nimsoft\probes\service\wasp\webapps\cabijs\WEB-INF\js.config.properties
..\Nimsoft\probes\service\wasp\webapps\cabijs\WEB-INF\classes\jasperreports.properties

Resolution

This can happen if the installation of UIM was not to a default location. Update 

..\Nimsoft\probes\service\wasp\webapps\cabijs\WEB-INF\js.config.properties
..\Nimsoft\probes\service\wasp\webapps\cabijs\WEB-INF\classes\jasperreports.properties

with the correct path to ../phantomjs.exe

Additional Information

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/unified-infrastructure-management/20-4/installing/ca-business-intelligence-with-ca-uim/installing-and-upgrading-ca-business-intelligence-jasperreports-server-with-ca-uim/install-or-upgrade-for-a-bundled-ca-business-intelligence-jasperreports-server.html#concept.dita_c2a97a88c62cb3b239ae19b62fa62638ef4156bf_Troubleshooting