[英]java.lang.NoClassDefFoundError: org/apache/http/conn/params/ConnPerRoute
[英]java.lang.NoClassDefFoundError: org/apache/http/nio/conn/NHttpClientConnectionManager
我目前有這些罐子:
錯誤的來源是我的java方法:
private HttpResponse<JsonNode> jwtAuthPost(String assertion) throws UnirestException {
HttpResponse<JsonNode> jsonResponse = Unirest.post(AUTH_URL)
.header("accept", "application/json")
.field("grant_type", JWT_GRANT_TYPE)
.field("client_id", this.clientId)
.field("client_secret", this.clientSecret)
.field("assertion", assertion)
.asJson(); //error here
return jsonResponse;
}
我猜想這個地方我缺少一個插件,但是我似乎在任何地方都找不到它。
其余錯誤日志
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/nio/conn/NHttpClientConnectionManager
at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:154)
at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:134)
at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)
包括
httpasyncclient-4.0-beta 4 .jar
代替
httpasyncclient-4.0-beta 3 .jar
請參閱: http : //www.java2s.com/Code/Jar/h/Downloadhttpasyncclient40beta4jar.htm
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.