I am trying to add an "XML File" datasource in Jaspersoft Studio 6.2 to a report which is actually a call to a REST service requiring a single parameter as part of the path.
if the image doesn't display here is a description:
The URL I use is like so : http://.../service/rest/report/
Options:
GET
Parameter:
name=id
value=$P{ReportID} (the parameter is already created with a default value)
When I try to test it, this is what happens
net.sf.jasperreports.engine.JRRuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at net.sf.jasperreports.data.http.HttpDataConnection.getInputStream(HttpDataConnection.java:101)
at net.sf.jasperreports.data.DataFileStream.<init>(DataFileStream.java:47)
at net.sf.jasperreports.data.DataFileUtils.getDataStream(DataFileUtils.java:62)
at net.sf.jasperreports.data.xml.XmlDataAdapterService.loadDataDocument(XmlDataAdapterService.java:140)
at net.sf.jasperreports.data.xml.XmlDataAdapterService.contributeParameters(XmlDataAdapterService.java:70)
at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:105)
at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.runOperations(AbstractDataAdapterWizard.java:162)
at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:59)
at java.lang.Thread.run(Thread.java:745)
I know this should work. I can call the service in a browser using .../report/?id=xx
and I get back the expected XML data. I have also tested this using the "WebService Data Source" plug-in found on the community.jaspersoft.com site - that works as well in the Studio app (but I am unable to configure it on the server).
So the question is, how do I get around this SSL exception? My app server is internal and does not use SSL (still under development).
There a two ways to tackle this:
For more details take a look here: How to ignore PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException?