Hi, I found the same thing listed here at :
http://googleweblight.com/?lite_url=http://stackoverflow.com/questions/32105513/solr-bad-return-type-error&ei=xQ0ZJDXt&lc=en-IN&s=1&m=940&host=www.google.co.in&ts=1483722084&sig=AF9NedkxZ3LIU1o5BOd8inhSmW5Q5azbHA HttpSolrClient has a constructor that accepts an HttpClient. When not passed, it creates an internalClient that is a CloseableHttpClient. So you can create a Default client and pass it as follows: SystemDefaultHttpClient httpClient =newSystemDefaultHttpClient();HttpSolrClient client =newHttpSolrClient(url, httpClient); I think the problem is the incorrect usage. Can you try this? Thanks, Atita On Jan 6, 2017 10:19 PM, "Susheel Kumar" <susheel2...@gmail.com> wrote: Which solrj version are you using and can you point which line exactly throws the error? Thnx On Fri, Jan 6, 2017 at 2:04 AM, gayathri...@tcs.com <gayathri...@tcs.com> wrote: > Hi > > Im using solr 5.4.0 while running my code i get below eroor please suggest > what has to be done > > public static void main(String[] args) throws SolrServerException, > IOException { > > > String urlString = "http://localhost:8983/solr/"; > SolrClient client = new HttpSolrClient(urlString); > } > > Error : > > java.lang.VerifyError: Bad type on operand stack > Exception Details: > Location: > > org/apache/http/impl/client/DefaultHttpClient.setDefaultHttpParams(Lorg/ > apache/http/params/HttpParams;)V > @4: invokestatic > Reason: > Type 'org/apache/http/HttpVersion' (current frame, stack[1]) is not > assignable to 'org/apache/http/ProtocolVersion' > > please suggest what has to be done > > > > -- > View this message in context: http://lucene.472066.n3. > nabble.com/error-during-running-my-code-java-lang-VerifyError-Bad-type-on- > operand-stack-tp4312690.html > Sent from the Solr - User mailing list archive at Nabble.com. >