Reputation: 41
i am using httpclient-4.1.2 jar file in my project,and write code:
HttpClient client = new DefaultHttpClient();
but its throwing an exception
Exception in thread "main" java.lang.VerifyError: (class: org/apache/http/impl/client/DefaultHttpClient, method: setDefaultHttpParams signature: (Lorg/apache/http/params/HttpParams;)V) Incompatible argument to function
Upvotes: 0
Views: 1998
Reputation: 7729
The parameter "HttpParams" is in fact an interface which needs to be sent as parameter to setDefaultHttpParams
.
Are you constructing this and is it being sent? In order to send it, you need to have some other jar, and this is the problem.
Upvotes: 1
Reputation: 9941
You have to have the other jars for the httpclient as well (httpcore for example, a lots of the apache commons as well).
Upvotes: 1