javax.naming.CommunicationException: java.security.cert.CertificateException: Invalid Server Certificate: server certificate could not be verified, and the CA certificate is missing from the certificate chain. raw error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Invalid Server Certificate: server certificate could not be verified, and the CA certificate is missing from the certificate chain. raw error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]; remaining name ''

debian.org | 2 weeks ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and poroszd . Or join the community to write better ones.
  1. 0

    #597967 - Ignores installed CA; refuses to make SSL connection - Debian Bug report logs

    debian.org | 2 weeks ago
    javax.naming.CommunicationException: java.security.cert.CertificateException: Invalid Server Certificate: server certificate could not be verified, and the CA certificate is missing from the certificate chain. raw error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Invalid Server Certificate: server certificate could not be verified, and the CA certificate is missing from the certificate chain. raw error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]; remaining name ''
  2. 0
    samebug tip
    Import the server certificate into your truststore.
  3. 0
    samebug tip
    Set the 'mail.smtp.ssl.trust' system property to an smtp host, like 'smtp.gmail.com'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Still getting SunCertPathBuilderException after importing certificate

    Stack Overflow | 3 years ago | MahmoudS
    javax.naming.CommunicationException: simple bind failed: server.ip:636 [Root exception is 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]
  6. 0

    WSO2 Identity Server with OpenLDAP and SSL

    Stack Overflow | 4 years ago | tykeal
    javax.naming.CommunicationException: simple bind failed: ldapserver.example.com:636 [Root exception is 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]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.cert.CertificateException

      Invalid Server Certificate: server certificate could not be verified, and the CA certificate is missing from the certificate chain. raw error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

      at com.ca.commons.security.JXTrustManager.checkServerTrusted()
    2. com.ca.commons
      JXTrustManager.checkServerTrusted
      1. com.ca.commons.security.JXTrustManager.checkServerTrusted(JXTrustManager.java:141)
      1 frame
    3. Java JSSE
      AppInputStream.read
      1. sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1025)
      2. sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:146)
      3. sun.security.ssl.Handshaker.processLoop(Handshaker.java:546)
      4. sun.security.ssl.Handshaker.process_record(Handshaker.java:482)
      5. sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:904)
      6. sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1140)
      7. sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:764)
      8. sun.security.ssl.AppInputStream.read(AppInputStream.java:94)
      8 frames
    4. Java RT
      Thread.run
      1. java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      2. java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
      3. java.io.BufferedInputStream.read(BufferedInputStream.java:334)
      4. com.sun.jndi.ldap.Connection.run(Connection.java:820)
      5. java.lang.Thread.run(Thread.java:636)
      5 frames