Jump to content
Changes to the Jaspersoft community edition download ×

simo.tuokko

Members
  • Posts

    8
  • Joined

  • Last visited

simo.tuokko's Achievements

  1. Hi, We are trying to create report against REST API which returns data in JSON format (ElasticSearch). We have managed to get report itself working in JasperSoft Studio Pro 7.9.0 using JSON Datasource. In JasperReport Server 7.9.0 we were unable to give required parameters for JSON Datasource so we ended up importing datasource from Studio to Server as xml. See https://community.jaspersoft.com/questions/1185171/same-parameters-json-datasource-jasper-reports-server-jaspersoft-studio Next step would be to add Input Control (multivalue) which would be populated from the same REST-datasource. When creating Input Control in Server's UI it seems that Server does not understand that imported datasource.xml is a datasource (as it is not available in the list of datasources). And as described earlier creating the JSON-datasource with needed parameters/options in Server is not supported. So does anyone know how to use JSON/REST datasource in Input Control or some other approach for this?
  2. I forgot that I made this question here. Solution was quite simple, just added clause that list should not be empty list: AND '$P!{listFromFirstInputControl}' != '[]'
  3. I ended up importing the DataSourceAdapter.xml from studio to JasperReports Server. Also needed to change in the report's .jrxml property (as it was suggested somewhere in this forum) from: <property name="com.jaspersoft.studio.data.defaultdataadapter" value="DataSourceAdapter"/> to:<property name="net.sf.jasperreports.data.adapter" value="repo:/yyyy/DataSourceAdapter.xml"/> This way report creates the connection succesfully.
  4. Hi, How to set same options/parameters for JSON datasource in Jasper Reports Server as in JasperSoft Studio? I am using 7.9.0 version of both of them. I would need to set username+password, request type, and add http header. These are only parameters I see in Jasper server UI: URI, Language and Query
  5. Finally got this resolved. I was trying to connect directly with IP address but the certificate required connection to be made with server's name.
  6. Hi, I am using Tibco Jaspersoft Studio Professional 7.5.0 and trying to create JSON datasource which uses https. I have added certificate to (Mac) /Applications/TIBCO Jaspersoft Studio 7.5.0 Pro.app/Contents/Eclipse/features/jre.macosx.cocoa.x86_64.feature_1.8.0.u151/jre/Contents/Home/lib/security/cacerts using Java’s keytool. I have also tried to add certificate to my computer's default Java cacerts. When testing the datasource following exception is thrown: 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:79) at net.sf.jasperreports.data.json.JsonDataAdapterService.contributeParameters(JsonDataAdapterService.java:75) at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:122) at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.runOperations(AbstractDataAdapterWizard.java:155) at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:51) at java.lang.Thread.run(Thread.java:748) Caused by: 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 sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) at sun.security.ssl.Handshaker.process_record(Handshaker.java:961) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) at org.apache.http.impl.conn.BasicHttpClientConnectionManager.connect(BasicHttpClientConnectionManager.java:313) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:394) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at net.sf.jasperreports.data.http.HttpDataConnection.getInputStream(HttpDataConnection.java:67) ... 7 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496) ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392) ... 33 more Anyone know how to correctly add certificates for the JSON datasource in Studio?
  7. This doesn't help as it will produce following where clause when listFromFirstInputControl is empty: "WHERE 1=2 OR 0 = 0" So it will still return all the rows.
  8. Hi, I am trying to create cascading input control with multi-select queries in both of them. I am using $X{IN, fieldname, listFromFirstInputControl} in the query of the second Input Control. It basically works but now it always returns all records if there are no selections in first Input Control as $X{IN.. returns 0=0. How this could be changed so that when there is no selections in first Input Control no result would be shown in second Input Control?
×
×
  • Create New...