NoSuchFieldError при вызове execute для DefaultHttpClient
Я продолжаю получать NoSuchFieldError, когда я вызываю execute для моего экземпляра DefaultHttpClient. Это строки кода, которые у меня есть.
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://10.65.98.158/atlas/rest/comparablesBulk?type=permId");
StringEntity req = new StringEntity(request.toJSONString(),ContentType.APPLICATION_JSON);
post.setEntity(req);
HttpResponse response = client.execute(post);//this is where the error happens
Это трассировка стека, которую я получаю:
Exception in thread "main" java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET
at org.apache.http.impl.client.DefaultHttpClient.setDefaultHttpParams(DefaultHttpClient.java:175)
at org.apache.http.impl.client.DefaultHttpClient.createHttpParams(DefaultHttpClient.java:158)
at org.apache.http.impl.client.AbstractHttpClient.getParams(AbstractHttpClient.java:448)
at org.apache.http.impl.client.AbstractHttpClient.createClientConnectionManager(AbstractHttpClient.java:309)
at org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:466)
at org.apache.http.impl.client.AbstractHttpClient.createHttpContext(AbstractHttpClient.java:286)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:851)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
at AtlasService.main(AtlasService.java:62)