Chrome and or PhantomJS not properly configured for server side rendering
search cancel

Chrome and or PhantomJS not properly configured for server side rendering

book

Article ID: 272627

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

We have installed JasperReports 8.1 on Windows 2019. We migrated all reports from JasperReports 7.1.1 to 8.1. When we are trying to export some reports to PDF gives us below error-

2023-08-14T07:36:25,354 ERROR SecureExceptionHandlerImpl,pool-18-thread-3:125 - net.sf.jasperreports.engine.JRRuntimeException: Chrome and/or PhantomJS not properly configured for server side rendering com.jaspersoft.jasperserver.remote.exception.ExportExecutionRejectedException: net.sf.jasperreports.engine.JRRuntimeException: Chrome and/or PhantomJS not properly configured for server side rendering
 at com.jaspersoft.jasperserver.remote.services.impl.ReportExecutorImpl.exportReport(ReportExecutorImpl.java:210)
 at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.generateReportOutput(RunReportServiceImpl.java:1170)
 at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.executeExport(RunReportServiceImpl.java:617)
 at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl$2.run(RunReportServiceImpl.java:509)
 at com.jaspersoft.jasperserver.api.logging.util.LoggableExecutorService$1.run(LoggableExecutorService.java:84)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)

The Chrome/Chromium was not installed on JasperReports server. I installed the Chrome Version 115.0.5790.171 (64-bit) on server and as mentioned in post installation tasks of JasperReports 8.1 install tech doc, I set the 'js.config.properties' file as below-

# Path to Chrome/Chromium executable, required for dashboard and visual components to download/export reports in PDF format
chrome.path=C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe

After restarting Apache Tomcat service, I am still not getting to download the report in PDF format. I am getting new error 'com.github.kklisura.cdt.services.exceptions.ChromeServiceException: Server responded with non-200 code: 405 - Method Not Allowed. Using unsafe HTTP verb GET to invoke /json/new. This action supports only PUT verb.

Environment

Release : 14.4

Resolution

Add the below settings under "...\webapps\jasperserver-pro\WEB-INF\classes\jasperreports.properties"

net.sf.jasperreports.chrome.page.isolate=true
net.sf.jasperreports.chrome.argument.remote-allow-origins=*

Post configuring these properties, you need to restart the Jasper server.