: Strangely i dont get this error when i execute this code from command line. : This error only occurs when i access it from a web application. Secondly, : this same method works fine with another web application. Both web ... : java.lang.NoSuchMethodError: : org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams; : at : org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.setDefaultMaxConnectionsPerHost(CommonsHttpSolrServer.java:455)
...if you only get this problem in some enviornments, then i suspect there is something wrong with those environments (and clearly not with the code). I would start by checking every jar in all of your environments and making sure you don't have multiple copies of hte same jar (in different versions) mistakenly installed. -Hoss