This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

need help in resolving this eror: javax.net.ssl.SSLHandshakeException  RSS feed

 
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am installing jbpm using this link: https://docs.jboss.org/jbpm/v6.0/userguide/jBPMInstaller.html
and everytime facing this error

C:\jbpm-installer\build.xml:293: 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:1946)
       at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
       at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
       at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
       at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
       at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
       at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
       at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
       at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
       at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
       at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
       at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
       at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
       at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
       at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:766)
       at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:676)
       at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:666)
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:262)
       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:1621)
       ... 13 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)
       ... 19 more


can anybody help in resolving.. need urgenlty.

Thanks in advance
 
Master Rancher
Posts: 1107
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First you need to obtain the public certificate from the server you're trying to connect to. That can be done in a variety of ways, such as contacting the server admin and asking for it, using openssl to download it, or, if it's an HTTP server, connecting to it with any browser, viewing the page's security info, and saving a copy of the certificate. (Google should be able to tell you exactly what to do for your specific browser.)

If you're trying to connect to a local server, there a plenty of sites that provide you with a certificate for free or you'll have to change your protocol to http instead of https

Now that you have the certificate saved in a file, you need to add it to your JVM's trust store. At $JAVA_HOME/jre/lib/security/ for JREs or $JAVA_HOME/lib/security for JDKs, there's a file named cacerts, which comes with Java and contains the public certificates of the well-known Certifying Authorities. To import the new cert, run keytool as a user who has permission to write to cacerts:

keytool -import -file <the cert file> -alias <some meaningful name> -keystore <path to cacerts file>

It will most likely ask you for a password. The default password as shipped with java is changeit. Almost nobody changes it. After you complete these relatively simple steps, you'll be communicating securely and with assurance that you're talking to the right server and only the right server (as long as they don't lose their private key).
 
Are you okay? You look a little big. Maybe this tiny ad will help:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!