簡體   English   中英

java.lang.NoClassDefFoundError:org / apache / http / nio / conn / NHttpClientConnectionManager

[英]java.lang.NoClassDefFoundError: org/apache/http/nio/conn/NHttpClientConnectionManager

我目前有這些罐子:

  • httpasyncclient-4.0-beta3.jar
  • HttpClient的-4.5.jar
  • HttpClient的緩存-4.5.jar
  • HttpClient的雙贏-4.5.jar
  • 的HttpCore-4.3.jar
  • 的HttpCore-NIO-4.1-beta2.jar
  • httpmime-4.2.3.jar
  • SLF4J-API 1.7.12.jar

錯誤的來源是我的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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM