Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SolrJ HttpSolrServer throwing NoHttpResponseException during instantiation

SolrJ is throwing NoHttpResponseException when trying to instantiate HttpSolrServer. Anyone knows why?

In the code I do:

SolrServer server = new HttpSolrServer ("http://localhost:8983/solr/"); // or some other url.

and it throws:

 javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException

I'm using Solr and SolrJ 4.1.0

like image 310
user2123926 Avatar asked Mar 01 '13 16:03

user2123926


1 Answers

I dont know if your problem was the same as mine but i thought that i'm getting the same exception until i noticed that i'm having the exception noClassFound :NoHttpResponseException and just by adding this package httpclient-4.1.3 the issue was solved. hope this helps.

like image 162
Hilmi Avatar answered Jan 01 '23 09:01

Hilmi