This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

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
 
Rancher
Posts: 1170
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).
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!