javax.net.ssl.SSLHandshakeException:对于使用JAX-RS的http GET

时间:2016-09-13 22:33:10

标签: jax-rs rest-assured sslhandshakeexception

我正在使用RestAssured为JAX-RS GET请求运行JUnit测试。我打电话给下面的“http”网址

given().request().log().all().accept(ContentType.JSON).auth().basic(this.testUser,this.testPassword).cookie(testCookie).response().log().all().get(HTTP_TEST_URL).then().statusCode(200).contentType(ContentType.JSON);

我收到以下错误:

javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX路径构建失败 ... 引起:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径

由于我使用的是“http”而不是“https”,因此无法理解SSLException。

对此相关的任何帮助都将受到高度赞赏!

0 个答案:

没有答案