Java Error while Preview a Java Report

Hello,

I have tried to preview a designed pixel report, build on Jasperoft Studio 7.9.

My report contains a HTM5 chart. The report does not work as excepted and i got an error.

Reports without theese charts will be shown as usual and run without exceptions.

Is there anybody who can help or have the same issue?

I have got the following error message since 01.03.2023 on reports working with HTML5 Charts:

net.sf.jasperreports.engine.JRRuntimeException: 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.
    at com.jaspersoft.jasperreports.highcharts.charts.ChartPptxHandler.exportElement(ChartPptxHandler.java:45)
    at net.sf.jasperreports.engine.export.ooxml.JRPptxExporter.exportGenericElement(JRPptxExporter.java:2066)
    at net.sf.jasperreports.engine.export.ooxml.JRPptxExporter.exportElement(JRPptxExporter.java:737)
    at net.sf.jasperreports.engine.export.ooxml.JRPptxExporter.exportPage(JRPptxExporter.java:618)
    at net.sf.jasperreports.engine.export.ooxml.JRPptxExporter.exportReportToStream(JRPptxExporter.java:514)
    at net.sf.jasperreports.engine.export.ooxml.JRPptxExporter.exportReport(JRPptxExporter.java:311)
    at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.exportWithProgress(AExportAction.java:223)
    at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.doPreview(AExportAction.java:346)
    at com.jaspersoft.studio.editor.preview.actions.export.AExportAction$3.run(AExportAction.java:194)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: 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.
    at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.request(ChromeServiceImpl.java:290)
    at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.createTab(ChromeServiceImpl.java:137)
    at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.createTab(ChromeServiceImpl.java:132)
    at net.sf.jasperreports.chrome.StandardPageCreator.lambda$runInPage$0(StandardPageCreator.java:57)
    at net.sf.jasperreports.chrome.ChromeInstance.runWithChromeInstance(ChromeInstance.java:92)
    at net.sf.jasperreports.chrome.StandardPageCreator.runInPage(StandardPageCreator.java:52)
    at net.sf.jasperreports.chrome.BrowserService.evaluateInPage(BrowserService.java:98)
    at com.jaspersoft.jasperreports.highcharts.charts.render.ChromeSVGProducer.getChartSvg(ChromeSVGProducer.java:155)
    at com.jaspersoft.jasperreports.highcharts.charts.render.DefaultChartSvgProducer.getChartSvg(DefaultChartSvgProducer.java:31)
    at com.jaspersoft.jasperreports.highcharts.charts.render.ChartSvgImageProducer.createRenderable(ChartSvgImageProducer.java:99)
    at com.jaspersoft.jasperreports.highcharts.charts.render.ChartSvgImageProducer.getChartImage(ChartSvgImageProducer.java:52)
    at com.jaspersoft.jasperreports.highcharts.charts.ChartPptxHandler.exportElement(ChartPptxHandler.java:41)
    ... 9 more
 

BR

Matze

 

matthias.bauer_1's picture
Joined: Nov 30 2018 - 3:47am
Last seen: 1 week 1 day ago

Thanks a lot, this solved my problem!

matthias.bauer_1 - 1 week 6 days ago

I've got the same issue and added the 2 properties (well, the isolate one was an edit from false to true), but I still got the same error message. Even after restarting it shows the same.

Is there another way of avoiding this? Does it need to use Chrome?

gootjemar - 1 week 3 days ago

Hi, I have added this 2 properties in jasperreports.properties, restart server, still did not help. Where exactly we need to have these properties ?

ramakanta.biswal - 1 day 1 hour ago

1 Answer:

Set the following two properties under Settings/Jaspersoft Studio/Properties:

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

A background, the problem is caused by Chrome/Chromium 111 introducing changes that makes it incompatible with the library used to connect to the Devtools Protocol. The two properties above are workarounds for the incompatibilities.

Regards,

Lucian

lucianc's picture
72599
Joined: Jul 17 2006 - 1:10am
Last seen: 27 min 53 sec ago
Feedback
randomness