On 12/15/2016 10:32 AM, tesm...@gmail.com wrote: > I am getting the following exception while creating a Solr client. Any help > is appreciated > > =====This is code snipper to create a SolrClient=============== > > public void populate (String args) throws IOException, SolrServerException > { > String urlString = "http://localhost:8983/solr"; > SolrClient server = new HttpSolrClient.Builder(urlString).build(); > .......... > .......... > ======================= <snip> > Type 'org/apache/http/impl/client/SystemDefaultHttpClient' (current > frame, stack[0]) is not assignable to > 'org/apache/http/impl/client/CloseableHttpClient' (from method signature)
What's likely happening here is that you've got a problem with the httpcomponents jars (httpclient, httpcore, httpmime) -- these are dependencies of SolrJ. Either you've got an incorrect version of one or more of these jars, or you've got more than one version of them on your classpath. In general, a 4.5.x version of httpclient should work with most recent versions of SolrJ. Running with httpcomponents older than 4.3.0 could be problematic. Thanks, Shawn