java.lang.RuntimeException: 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

GitHub | 0312birdzhang | 5 months ago
  1. 0

    证书错误

    GitHub | 5 months ago | 0312birdzhang
    java.lang.RuntimeException: 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

    GitHub comment 168#149488160

    GitHub | 1 year ago | comschmid
    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

    PKIX path building failed error persists on Oracle JDK

    Stack Overflow | 9 months ago | Sage Gerard
    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

    After Upgrading to Jira Server 7.1, It seems like all my gadgets stopped working with the exception of a few of the gadgets. I keep getting the below error: https://confluence.atlassian.com/display/KB/Unable+to+Connect+to+SSL+Services+due+to+PKIX+Path+Building+Failed However when looking at the logs, Jira is not looking for any external domain but is instead looking for my WAN IP and localhost. I do not understand why this is the case. {code:java} 2016-02-23 06:31:52,280 http-nio-8080-exec-12 ERROR zane 391x3613x1 15654vw x.x.x.x,127.0.0.1 /secure/MyJiraHome.jspa [c.a.g.r.internal.http.HttpClientFetcher] Unable to retrieve response 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:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1497) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:543) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:409) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher.fetch(HttpClientFetcher.java:97) at org.apache.shindig.gadgets.DefaultMessageBundleFactory.fetchBundle(DefaultMessageBundleFactory.java:138) at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getNestedBundle(DefaultMessageBundleFactory.java:111) at org.apache.shindig.gadgets.DefaultMessageBundleFactory.getBundle(DefaultMessageBundleFactory.java:79) at org.apache.shindig.gadgets.variables.VariableSubstituter.substitute(VariableSubstituter.java:47) at com.atlassian.gadgets.renderer.internal.GadgetSpecFactoryImpl.getGadgetSpec(GadgetSpecFactoryImpl.java:127) at com.atlassian.gadgets.renderer.internal.GadgetSpecFactoryImpl.getGadgetSpec(GadgetSpecFactoryImpl.java:79) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy2006.getGadgetSpec(Unknown Source) at com.atlassian.gadgets.dashboard.internal.impl.GadgetFactoryImpl.createSpecificationBasedGadget(GadgetFactoryImpl.java:118) at com.atlassian.gadgets.dashboard.internal.impl.GadgetFactoryImpl.access$000(GadgetFactoryImpl.java:40) at com.atlassian.gadgets.dashboard.internal.impl.GadgetFactoryImpl$1.visit(GadgetFactoryImpl.java:72) at com.atlassian.gadgets.dashboard.internal.impl.GadgetFactoryImpl$1.visit(GadgetFactoryImpl.java:69) at com.atlassian.gadgets.GadgetState.accept(GadgetState.java:132) at com.atlassian.gadgets.dashboard.internal.impl.GadgetFactoryImpl.createDashboardItem(GadgetFactoryImpl.java:69) at com.atlassian.gadgets.dashboard.internal.impl.StateConverterImpl.convertStateToGadget(StateConverterImpl.java:28) at com.atlassian.gadgets.dashboard.internal.impl.DashboardImpl$DashboardItemStateConverter.apply(DashboardImpl.java:196) at com.atlassian.gadgets.dashboard.internal.impl.DashboardImpl$DashboardItemStateConverter.apply(DashboardImpl.java:194) at com.google.common.collect.Iterators$8.transform(Iterators.java:799) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:651) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:650) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:43) at com.google.common.collect.Iterators$5.hasNext(Iterators.java:547) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:268) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:226) at com.atlassian.gadgets.dashboard.internal.rest.representations.RepresentationFactoryImpl.createDashboardRepresentation(RepresentationFactoryImpl.java:48) at com.atlassian.gadgets.dashboard.internal.velocity.DashboardEmbedder.dashboardToJsonObject(DashboardEmbedder.java:47) at com.atlassian.gadgets.dashboard.internal.velocity.DashboardView.getLayoutsJson(DashboardView.java:164) at com.atlassian.gadgets.dashboard.internal.velocity.DashboardView.writeTo(DashboardView.java:77) at com.atlassian.jira.web.action.Dashboard$1.render(Dashboard.java:231) at com.atlassian.jira.web.tags.RenderTag.doStartTag(RenderTag.java:37) at jsp.secure.views.dashboard_jsp._jspx_meth_ww_005frender_005f0(dashboard_jsp.java:118) at jsp.secure.views.dashboard_jsp._jspService(dashboard_jsp.java:73) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 29 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 18 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:37) ... 87 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 21 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:107) ... 14 filtered at com.atlassian.web.servlet.plugin.ThreadLocalServletForwarder.forward(ThreadLocalServletForwarder.java:45) at com.atlassian.jira.web.action.MyJiraHome.forward(MyJiraHome.java:108) at com.atlassian.jira.web.action.MyJiraHome.doExecute(MyJiraHome.java:37) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 55 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59) ... 70 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 37 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$664(CustomerContextSettingFilter.java:169) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter$$Lambda$461/1525248516.call(Unknown Source) at com.atlassian.servicedesk.internal.util.scala.ScalaJavaInterOp$1.apply(ScalaJavaInterOp.java:25) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil$.outOfCustomerContext(CustomerContextUtil.scala:48) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil.outOfCustomerContext(CustomerContextUtil.scala) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.outOfCustomerContext(CustomerContextServiceImpl.java:24) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:164) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:120) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:112) ... 55 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 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:387) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1479) ... 494 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:145) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 500 more 23-Feb-2016 06:32:04.279 WARNING [http-nio-8080-exec-25] null.null A servlet request, to the URI https://jira.example.com/rest/activity-stream/1.0/preferences?_=1456180303268, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected. {code}

    Atlassian JIRA | 10 months ago | Zane J. Chua
    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

    unable to find valid certification path to requested target with Apiman Gateway

    GitHub | 6 months ago | cmoulliard
    java.lang.RuntimeException: 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. kid 540 times, last 5 months ago
  2. poroszd 1 times, last 9 months ago
97 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. 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()
  2. Java JSSE
    SSLSocketImpl.startHandshake
    1. sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    2. sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)
    3. sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
    4. sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)
    5. sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446)
    6. sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)
    7. sun.security.ssl.Handshaker.processLoop(Handshaker.java:901)
    8. sun.security.ssl.Handshaker.process_record(Handshaker.java:837)
    9. sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023)
    10. sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    11. sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    12. sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    12 frames
  3. Apache HttpClient
    CloseableHttpClient.execute
    1. org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
    2. org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
    3. org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    4. org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    5. org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    6. org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    7. org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    8. org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    9. org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    10. org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    11. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    12. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    12 frames
  4. me.chanjar.weixin
    WxCpServiceImpl.messageSend
    1. me.chanjar.weixin.cp.api.WxCpServiceImpl.getAccessToken(WxCpServiceImpl.java:127)
    2. me.chanjar.weixin.cp.api.WxCpServiceImpl.getAccessToken(WxCpServiceImpl.java:139)
    3. me.chanjar.weixin.cp.api.WxCpServiceImpl.executeInternal(WxCpServiceImpl.java:562)
    4. me.chanjar.weixin.cp.api.WxCpServiceImpl.execute(WxCpServiceImpl.java:535)
    5. me.chanjar.weixin.cp.api.WxCpServiceImpl.post(WxCpServiceImpl.java:519)
    6. me.chanjar.weixin.cp.api.WxCpServiceImpl.messageSend(WxCpServiceImpl.java:195)
    6 frames
  5. it.sauronsoftware.cron4j
    TaskExecutor$Runner.run
    1. it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source)
    1 frame
  6. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame