Jaspersoft Studio unable to connect when there is a SSL handshake failure in Clarity SaaS
search cancel

Jaspersoft Studio unable to connect when there is a SSL handshake failure in Clarity SaaS

book

Article ID: 193579

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Unable to connect to Jaspersoft Studio and Jaspersoft JDBC Adapters. An error in the logs shows referencing an SSLHandshakeException, unable to find valid certification path to requested target.

Steps To Reproduce: 

  1. Download and install Jaspersoft Studio 
  2. Configure Jaspersoft Studio using the documentation: Install Jaspersoft Studio Professional 7.1 and CA JDBC Adapter

Expected Result: The connection to the Jaspersoft Studio and Jaspersoft JDBC Adapters.

Actual Result: The connection errors with the errors listed in the cause section below.

Environment

Release : All Supported Clarity release 

Component : CLARITY SAAS JASPERSOFT

Cause

The connection is failing because of the failure in SSL handshake between Jaspersoft Server and Jaspersoft Studio, the error stack is below:

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 sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsC

Resolution

  1. Open the Jaspersoft URL in the browser and click on the Lock icon on the browser navigation bar
  2. Download the certificate chain from Jaspersoft URL by opening it in the browser
  3. Click on the Certificate. On the certificate pop-up window, click on the Certification Path and click on view certificate to view the certificate details.  

  4. Navigate to the Jaspersoft Studio Installation directory
    example C:\Program Files\TIBCO\Jaspersoft Studio Professional-7.1(9).0.final\features\jre.win32.win32.x86_64.feature_1.8.0.u151\jre\lib\security
  5. From the Step 2, copy the certificate and place it under the Jaspersoft Studio Installation directory
    example C:\Program Files\TIBCO\Jaspersoft Studio Professional-7.1(9).0.final\features\jre.win32.win32.x86_64.feature_1.8.0.u151\jre\lib\security
  6. Run the key tool command by navigating to bin folder of Jaspersoft installation 
    example C:\Program Files\TIBCO\Jaspersoft Studio Professional-7.1(9).0.final\features\jre.win32.win32.x86_64.feature_1.8.0.u151\jre\bin
    1. keytool -importcert -file Root.cer -keystore cacerts -alias Root
      Enter Keytool Password: changeit
    2. keytool -importcert -file Intermediate.cer -keystore cacerts -alias intermediate
      Enter Keytool Password: changeit
    3. keytool -importcert -file Last.cer -keystore cacerts -alias servercert
      Enter Keytool Password: changeit
  7. Now restart Jaspersoft Studio and you should be able to connect

Additional Information

Note: The keytool command will import the certificate to the cacerts. If you have multiple certificates in your certificate chain you would need to import all of them as well by running the key tool command as mentioned in Step 6 under the resolution section

See also: