今天用java HttpClients写爬虫在访问某Https站点报如下错误: sun.security.validator.ValidatorException: PKIX path building failed... 网上找了找解决方案,看到这篇博客:http://www.oschina.net/question/12_19249 http://www.oschina.net/code/snippet_12_4092 经测试,解决问题,这里做个记录. /* * Copyright 2006…