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

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-beta4.jar

而不是

httpasyncclient-4.0-beta3.jar

参见:http://www.java2s.com/Code/Jar/h/Downloadhttpasyncclient40beta4jar.htm