ArrayIndexOutOfBoundsException when placing an image on report with https url and exporting to a PDF

0

We are trying to put an image on a report, and export to a pdf.

The image starts with https://

We see the image in Design

We see the image in Preview

When we go to export the pdf from Preview, we get an error:

net.sf.jasperreports.engine.JRException: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1
    at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.processImageRetainShape(JRPdfExporter.java:1997)
    at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.process(JRPdfExporter.java:1787)
    at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.access$300(JRPdfExporter.java:1713)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:1653)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:1267)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:1210)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:1074)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:691)
    at net.sf.jasperreports.engine.JasperExportManager.exportToPdf(JasperExportManager.java:217)
    at net.sf.jasperreports.engine.JasperRunManager.runToPdf(JasperRunManager.java:460)
    at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:852)

 

When we use an image url that is just http:// we do not get this error.

How do include an image with an https:// url in our pdf?

Sample report is attached.

Attachments: 
best.hds.team's picture
Joined: Jan 27 2021 - 6:37am
Last seen: 1 month 3 days ago

0 Answers:

No answers yet
Feedback
randomness