java.lang.NoSuchMethodError: org.apache.http.protocol.BasicHttpContext: method ()V not found

后端 未结 1 615
清酒与你
清酒与你 2020-12-16 03:34

Hi I am trying to put up a small webapp but I am getting above error. Below is my code

HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = n         


        
相关标签:
1条回答
  • 2020-12-16 04:06

    It looks like you have a jar file with an old/newer version of BasicHttpContext. If there was a direct conflict, you'd receive a ClassNotFoundException. ClassLoaders are typically jerks about this kind of thing. In this case, the class exists however does not have the method that another library (I believe it's httpclient that's invoking the Context) was compiled against.

    0 讨论(0)
提交回复
热议问题