Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7868467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:00:39+00:00 2026-06-03T01:00:39+00:00

I had the following exception while writing to a SSL socket javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX

  • 0

I had the following exception while writing to a SSL socket

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

It seems like the certificate of the target server is not trusted. I tested my implementation on a windows 7 machine, jdk7 and tomcat7 with no problem. The Exception is thrown on ubuntu 10 LTS with openJDK 6 and tomcat7. I got the sha1 and md5 fingerprint of the sockets target server. Am I right that the certificat of the server I am trying to stream to is not trustet on my ubuntu server? can I can the fingerprint to the tomcats keystore? If so, how do I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:00:40+00:00Added an answer on June 3, 2026 at 1:00 am

    It’s not the fingerprint that you need to add to your trust store, but the actual certificate.

    You can add the server certificate itself or add one of the CA certificates in the chain (if you wish to trust the all the certificates from that CA, not just that particular server).

    To find out what the certificate is, you can use OpenSSL:

    openssl s_client -showcerts -connect your.host.name:443
    

    (Replace the host name and 443 by the actual ports you’re using.)

    The blocks between --BEGIN/END CERT...-- are the certificates in PEM format. You can check their content using openssl x509 -text -noout (and pasting each block there).

    Save the certificate you want to import into a plain text file (e.g. certificate.pem). You should only import certificates that you trust. There’s a certain leap of faith here. (You might want to connect with your browser and check whether the key material matches, for example.)

    To import into your truststore use:

    keytool -importcert -keystore truststore.jks -file certificate.pem
    

    (You may need to specify an alias wit -alias some_name_you_choose.)

    If you want this to affect your default truststore, replace truststore.jks with the path to lib/security/cacerts in your Java home directory (the default password should be changeit).


    Since the target server seems to come from a well-known CA anyway (and it works with some versions of the JRE), the easiest fix is certainly to update your cacerts file manually, taking a copy from a JRE with which it works. After all, as the JSSE Reference Guide says:

    IMPORTANT NOTE: The JDK ships with a limited number of trusted root
    certificates in the /lib/security/cacerts file. As
    documented in keytool, it is your responsibility to maintain (that is,
    add/remove) the certificates contained in this file if you use this
    file as a truststore.

    Depending on the certificate configuration of the servers you contact,
    you may need to add additional root certificate(s). Obtain the needed
    specific root certificate(s) from the appropriate vendor.


    It turns out it’s certainly a problem with the certificate chain order (which is incorrect on this site), as shown by Qualys SSL Labs tester.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have had the following problem for a while and I am really not
While developing an application, I had the following problem. I wanted to return an
I've got the following error: TemplateSyntaxError at /admin/results_cop/copsegmentresult/ Caught an exception while rendering: ('ascii',
In my code I had an error that was catched by following exceptions while
While implementing a WCF client endpoint, my config file had the following endpoint entry:
While using a third party dll I was getting the following exception: exePath must
While debugging my application with Delphi 2009, I sometimes get the following exception occurring:
While working with ASP.NET MVC, I have noticed that exception messages issued by the
I had the following code: Contract.Requires(somecondition, some message/*some comment*/); and while debugging at some
I had the following idea: Say we have a webapp written using django which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.