org.apache.axis2.AxisFault: javax.net.ssl.SSLException: Connection has been shutdown: 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

com.br | 4 months ago
  1. 0

    [RESOLVIDO]NFe - Consulta NFe

    com.br | 4 months ago
    org.apache.axis2.AxisFault: javax.net.ssl.SSLException: Connection has been shutdown: 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
  2. 0

    Erro inesperado no Programa Emissor da NF-E - Página 2

    com.br | 7 months ago
    javax.net.ssl.SSLException: Connection has been shutdown: 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
  3. 0

    Currently the REST client builder does not allow self-signed SSL certs. Would like a checkbox so that we do not have to create a keystore with all valid certs in it. Here is an example exception. I verified that the URL works with "curl --insecure https://theurl". 2016/07/23 07:22:05 - REST Client.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Because of an error, this step can't continue: 2016/07/23 07:22:05 - REST Client.0 - Can not result from [https://localhost:8443/BabysDigest-1.0/rest/v1/bd-user/find/mike] 2016/07/23 07:22:05 - REST Client.0 - 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 2016/07/23 07:22:05 - REST Client.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : org.pentaho.di.core.exception.KettleException: 2016/07/23 07:22:05 - REST Client.0 - Can not result from [https://localhost:8443/BabysDigest-1.0/rest/v1/bd-user/find/mike] 2016/07/23 07:22:05 - REST Client.0 - 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 2016/07/23 07:22:05 - REST Client.0 - 2016/07/23 07:22:05 - REST Client.0 - at org.pentaho.di.trans.steps.rest.Rest.callRest(Rest.java:229) 2016/07/23 07:22:05 - REST Client.0 - at org.pentaho.di.trans.steps.rest.Rest.processRow(Rest.java:449) 2016/07/23 07:22:05 - REST Client.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62) 2016/07/23 07:22:05 - REST Client.0 - at java.lang.Thread.run(Thread.java:745) 2016/07/23 07:22:05 - REST Client.0 - Caused by: com.sun.jersey.api.client.ClientHandlerException: 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 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.client.apache.DefaultApacheHttpMethodExecutor.executeMethod(DefaultApacheHttpMethodExecutor.java:213) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.client.apache.ApacheHttpClientHandler.handle(ApacheHttpClientHandler.java:175) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:104) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.api.client.Client.handle(Client.java:648) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507) 2016/07/23 07:22:05 - REST Client.0 - at org.pentaho.di.trans.steps.rest.Rest.callRest(Rest.java:171) 2016/07/23 07:22:05 - REST Client.0 - ... 3 more 2016/07/23 07:22:05 - REST Client.0 - 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 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) 2016/07/23 07:22:05 - REST Client.0 - at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) 2016/07/23 07:22:05 - REST Client.0 - at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1565) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) 2016/07/23 07:22:05 - REST Client.0 - at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) 2016/07/23 07:22:05 - REST Client.0 - at com.sun.jersey.client.apache.DefaultApacheHttpMethodExecutor.executeMethod(DefaultApacheHttpMethodExecutor.java:210) 2016/07/23 07:22:05 - REST Client.0 - ... 10 more 2016/07/23 07:22:05 - REST Client.0 - Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 2016/07/23 07:22:05 - REST Client.0 - at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.validator.Validator.validate(Validator.java:260) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) 2016/07/23 07:22:05 - REST Client.0 - ... 27 more 2016/07/23 07:22:05 - REST Client.0 - Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 2016/07/23 07:22:05 - REST Client.0 - at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131) 2016/07/23 07:22:05 - REST Client.0 - at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) 2016/07/23 07:22:05 - REST Client.0 - at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) 2016/07/23 07:22:05 - REST Client.0 - ... 33 more

    Pentaho BI Platform Tracking | 5 months ago | Mike Baranski
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to handle invalid SSL certificates with Apache HttpClient?

    Stack Overflow | 7 years ago | rauch
    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

    JAVA - Tomcat 5 Application connecting to Web Service using HTTPS, while Tomcat 7 Application does not

    Stack Overflow | 3 years ago | Ryan S
    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

  1. Andreas Häber 8 times, last 3 weeks ago
  2. tvrmsmith 4 times, last 2 months ago
  3. Dore 1 times, last 3 months ago
  4. andyglick 17 times, last 2 months ago
  5. davidvanlaatum 10 times, last 4 months ago
2 more registered users
58 unregistered visitors
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. sun.security.provider.certpath.SunCertPathBuilderException

    unable to find valid certification path to requested target

    at sun.security.provider.certpath.SunCertPathBuilder.build()
  2. Java RT
    Validator.validate
    1. sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
    2. sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
    3. java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
    4. sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
    5. sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    6. sun.security.validator.Validator.validate(Validator.java:260)
    6 frames
  3. Java JSSE
    AppOutputStream.write
    1. sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
    2. sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
    3. sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    4. sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
    5. sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    6. sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    7. sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    8. sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    9. sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    10. sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)
    11. sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
    11 frames
  4. Java RT
    FilterOutputStream.flush
    1. java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    2. java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    3. java.io.FilterOutputStream.flush(FilterOutputStream.java:140)
    3 frames
  5. HttpClient
    ChunkedOutputStream.flush
    1. org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:191)
    1 frame
  6. Java RT
    XMLStreamWriterImpl.flush
    1. com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.flush(UTF8OutputStreamWriter.java:138)
    2. com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.flush(XMLStreamWriterImpl.java:397)
    2 frames
  7. Axiom API
    MTOMXMLStreamWriter.flush
    1. org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.flush(XMLStreamWriterWrapper.java:50)
    2. org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:198)
    2 frames
  8. org.apache.axis2
    MTOMAwareXMLSerializer.flush
    1. org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.flush(MTOMAwareXMLSerializer.java:79)
    1 frame
  9. Axiom API
    MTOMXMLStreamWriter.flush
    1. org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:198)
    1 frame
  10. Axiom Impl
    OMSerializableImpl.serialize
    1. org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:126)
    2. org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:113)
    2 frames
  11. br.inf.portalfiscal
    NfeConsulta2Stub$NfeDadosMsg$1.serialize
    1. br.inf.portalfiscal.www.nfe.wsdl.nfeconsulta2.NfeConsulta2Stub$NfeDadosMsg.serialize(NfeConsulta2Stub.java:2111)
    2. br.inf.portalfiscal.www.nfe.wsdl.nfeconsulta2.NfeConsulta2Stub$NfeDadosMsg.serialize(NfeConsulta2Stub.java:2056)
    3. br.inf.portalfiscal.www.nfe.wsdl.nfeconsulta2.NfeConsulta2Stub$NfeDadosMsg$1.serialize(NfeConsulta2Stub.java:2044)
    3 frames
  12. org.apache.axis2
    ADBDataSource.serialize
    1. org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
    1 frame
  13. Axiom Impl
    OMSerializableImpl.serializeAndConsume
    1. org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
    2. org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965)
    3. org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
    4. org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
    5. org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
    5 frames
  14. Apache Axis2 - Transport - HTTP
    AxisRequestEntity.writeRequest
    1. org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
    2. org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
    2 frames
  15. HttpClient
    HttpClient.executeMethod
    1. org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
    2. org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
    3. org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    4. org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    5. org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    6. org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    7. org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
    7 frames
  16. Apache Axis2 - Transport - HTTP
    CommonsHTTPTransportSender.invoke
    1. org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:560)
    2. org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
    3. org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
    4. org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
    5. org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
    5 frames
  17. org.apache.axis2
    OperationClient.execute
    1. org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)
    2. org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
    3. org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    4. org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    4 frames
  18. br.inf.portalfiscal
    NfeConsulta2Stub.nfeConsultaNF2
    1. br.inf.portalfiscal.www.nfe.wsdl.nfeconsulta2.NfeConsulta2Stub.nfeConsultaNF2(NfeConsulta2Stub.java:196)
    1 frame
  19. br.com.javac
    NFeConsultaNFe.main
    1. br.com.javac.nfejavac.NFeConsultaNFe.main(NFeConsultaNFe.java:111)
    1 frame