lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul നോബിള്‍ नोब्ळ्" <noble.p...@gmail.com>
Subject Re: Using SolrJ for response
Date Mon, 14 Jul 2008 08:08:09 GMT
You may need to check your classpath and ensure that you are using the
correct versions of httpclient (the ones shipped with solr)


On Mon, Jul 14, 2008 at 1:00 PM, Ranjeet <ranjeet.jha@ebusinessware.com> wrote:
> Hi,
>
> I am new to solrJ, in following code I got exception. Plese help, we did not get getParams()
method in HttpConnectionManager. In which jar we get with this method.
>
> public static void main (String [] args) {
>
>
> /*String url = "http://localhost:8983/solr";
>
> SolrServer server = new CommonsHttpSolrServer( url );
>
>
> server.setParser(new XMLResponseParser());*/
>
> try {
>
> SolrServer server = getSolrServer();
>
> SolrQuery solrQuery = new SolrQuery().
>
> setQuery("computer").
>
> setFacet(true).
>
> setFacetMinCount(1).
>
> setFacetLimit(8).
>
> addFacetField("category").
>
> addFacetField("inStock");
>
> QueryResponse rsp = server.query(solrQuery);
>
> SolrDocumentList docs = rsp.getResults();
>
>
> //List<Item> beans = rsp.getBeans(Item.class);
>
>
> } catch(Exception ex) {
>
> System.out.println(ex.getMessage());
>
> ex.printStackTrace();
>
> }
>
> }
>
> Exception got:
>
> Exception in thread "main" 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)
>
> at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<init>(CommonsHttpSolrServer.java:152)
>
> at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<init>(CommonsHttpSolrServer.java:125)
>
> at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<init>(CommonsHttpSolrServer.java:97)
>
> at com.xonos.ecommerce.search.solr.SolrClient.getSolrServer(SolrClient.java:50)
>
> at com.xonos.ecommerce.search.solr.SolrClient.main(SolrClient.java:26)
>
>
>
>
> Thanks & Regards,
> Ranjeet



-- 
--Noble Paul

Mime
View raw message